Files @ r23483:3733e6b8ff17
Branch filter:

Location: cpp/openttd-patchpack/source/media/extra_grf/canals_extra.nfo

Patric Stout
Remove: ENABLE_NETWORK switch

This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
//
// $Id$
//
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
   -1 * 0	 0C "Extra canal graphics by PaulC"

// Differentiation for the climates starts here

// Canal edges (arctic snowy)
   -1 * 4        01 05 01 \b12
   -1 sprites/canals.png 8bpp  30   40  45  22 -11  -1 normal
   -1 sprites/canals.png 8bpp  94   40  41  21  -8  10 normal
   -1 sprites/canals.png 8bpp 142   40  42  21 -31  10 normal
   -1 sprites/canals.png 8bpp 190   40  43  22 -31  -1 normal
   -1 sprites/canals.png 8bpp 238   40  22  22  11   4 normal
   -1 sprites/canals.png 8bpp 270   40  24  16 -11  15 normal
   -1 sprites/canals.png 8bpp 302   40  23  23 -31   4 normal
   -1 sprites/canals.png 8bpp 334   40  24  18 -11  -1 normal
   -1 sprites/canals.png 8bpp 366   40  12  11  21  10 normal
   -1 sprites/canals.png 8bpp 398   40  19  10  -8  21 normal
   -1 sprites/canals.png 8bpp 430   40  11  10 -31  10 normal
   -1 sprites/canals.png 8bpp 446   40  24  16 -11  -6 normal
   -1 * 7        02 05 10 01 00 00 00

// Canal edges (arctic normal)
   -1 * 4        01 05 01 \b12
   -1 sprites/canals.png 8bpp  30   70  45  22 -11  -1 normal
   -1 sprites/canals.png 8bpp  94   70  41  21  -8  10 normal
   -1 sprites/canals.png 8bpp 142   70  42  21 -31  10 normal
   -1 sprites/canals.png 8bpp 190   70  43  22 -31  -1 normal
   -1 sprites/canals.png 8bpp 238   70  22  22  11   4 normal
   -1 sprites/canals.png 8bpp 270   70  24  16 -11  15 normal
   -1 sprites/canals.png 8bpp 302   70  23  23 -31   4 normal
   -1 sprites/canals.png 8bpp 334   70  24  18 -11  -1 normal
   -1 sprites/canals.png 8bpp 366   70  12  11  21  10 normal
   -1 sprites/canals.png 8bpp 398   70  19  10  -8  21 normal
   -1 sprites/canals.png 8bpp 430   70  11  10 -31  10 normal
   -1 sprites/canals.png 8bpp 446   70  24  16 -11  -6 normal
   -1 * 7        02 05 11 01 00 00 00
// Choose the right arctic canal edges
   -1 * 14       02 05 12 81 81 00 FF 01 10 00 04 04 11 00
   -1 * 6        07 83 01 \7! 01 01
   -1 * 7        03 05 01 02 00 12 00

// Canal edges (tropic desert)
   -1 * 4        01 05 01 \b12
   -1 sprites/canals.png 8bpp  30  100  45  22 -11  -1 normal
   -1 sprites/canals.png 8bpp  94  100  41  21  -8  10 normal
   -1 sprites/canals.png 8bpp 142  100  42  21 -31  10 normal
   -1 sprites/canals.png 8bpp 190  100  43  22 -31  -1 normal
   -1 sprites/canals.png 8bpp 238  100  22  22  11   4 normal
   -1 sprites/canals.png 8bpp 270  100  24  16 -11  15 normal
   -1 sprites/canals.png 8bpp 302  100  23  23 -31   4 normal
   -1 sprites/canals.png 8bpp 334  100  24  18 -11  -1 normal
   -1 sprites/canals.png 8bpp 366  100  12  11  21  10 normal
   -1 sprites/canals.png 8bpp 398  100  19  10  -8  21 normal
   -1 sprites/canals.png 8bpp 430  100  11  10 -31  10 normal
   -1 sprites/canals.png 8bpp 446  100  24  16 -11  -6 normal
   -1 * 7        02 05 13 01 00 00 00

// Canal edges (tropic rainforest)
   -1 * 4        01 05 01 \b12
   -1 sprites/canals.png 8bpp  30  130  45  22 -11  -1 normal
   -1 sprites/canals.png 8bpp  94  130  41  21  -8  10 normal
   -1 sprites/canals.png 8bpp 142  130  42  21 -31  10 normal
   -1 sprites/canals.png 8bpp 190  130  43  22 -31  -1 normal
   -1 sprites/canals.png 8bpp 238  130  22  22  11   4 normal
   -1 sprites/canals.png 8bpp 270  130  24  16 -11  15 normal
   -1 sprites/canals.png 8bpp 302  130  23  23 -31   4 normal
   -1 sprites/canals.png 8bpp 334  130  24  18 -11  -1 normal
   -1 sprites/canals.png 8bpp 366  130  12  11  21  10 normal
   -1 sprites/canals.png 8bpp 398  130  19  10  -8  21 normal
   -1 sprites/canals.png 8bpp 430  130  11  10 -31  10 normal
   -1 sprites/canals.png 8bpp 446  130  24  16 -11  -6 normal
   -1 * 7        02 05 14 01 00 00 00
// Choose the right tropic canal edges
   -1 * 14       02 05 15 81 81 00 FF 01 13 00 01 01 14 00
   -1 * 6        07 83 01 \7! 02 01
   -1 * 7        03 05 01 02 00 15 00

// Canal edges (toyland)
   -1 * 4        01 05 01 \b12
   -1 sprites/canals.png 8bpp  30  160  45  22 -11  -1 normal
   -1 sprites/canals.png 8bpp  94  160  41  21  -8  10 normal
   -1 sprites/canals.png 8bpp 142  160  42  21 -31  10 normal
   -1 sprites/canals.png 8bpp 190  160  43  22 -31  -1 normal
   -1 sprites/canals.png 8bpp 238  160  22  22  11   4 normal
   -1 sprites/canals.png 8bpp 270  160  24  16 -11  15 normal
   -1 sprites/canals.png 8bpp 302  160  23  23 -31   4 normal
   -1 sprites/canals.png 8bpp 334  160  24  18 -11  -1 normal
   -1 sprites/canals.png 8bpp 366  160  12  11  21  10 normal
   -1 sprites/canals.png 8bpp 398  160  19  10  -8  21 normal
   -1 sprites/canals.png 8bpp 430  160  11  10 -31  10 normal
   -1 sprites/canals.png 8bpp 446  160  24  16 -11  -6 normal
   -1 * 7        02 05 16 01 00 00 00
   -1 * 6        07 83 01 \7! 03 01
   -1 * 7        03 05 01 02 00 16 00