From 3126914f3649950f1a72219566629b04ea793217 Mon Sep 17 00:00:00 2001 From: smatz Date: Fri, 23 Jan 2009 13:36:12 +0000 Subject: (svn r15223) -Codechange: move GetOldTownName to oldloader_sl.cpp as it is specific to loading of TTO/TTD savegames --- src/namegen.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src/namegen.cpp') diff --git a/src/namegen.cpp b/src/namegen.cpp index d9fa7c97d..e02228fc6 100644 --- a/src/namegen.cpp +++ b/src/namegen.cpp @@ -758,35 +758,3 @@ TownNameGenerator * const _town_name_generators[] = MakeItalianTownName, MakeCatalanTownName, }; - -/* DO WE NEED THIS ANY MORE? */ -#define FIXNUM(x, y, z) (((((x) << 16) / (y)) + 1) << z) - -uint32 GetOldTownName(uint32 townnameparts, byte old_town_name_type) -{ - switch (old_town_name_type) { - case 0: case 3: // English, American - /* Already OK */ - return townnameparts; - - case 1: // French - /* For some reason 86 needs to be subtracted from townnameparts - * 0000 0000 0000 0000 0000 0000 1111 1111 */ - return FIXNUM(townnameparts - 86, lengthof(name_french_real), 0); - - case 2: // German - DEBUG(misc, 0, "German Townnames are buggy (%d)", townnameparts); - return townnameparts; - - case 4: // Latin-American - /* 0000 0000 0000 0000 0000 0000 1111 1111 */ - return FIXNUM(townnameparts, lengthof(name_spanish_real), 0); - - case 5: // Silly - /* NUM_SILLY_1 - lower 16 bits - * NUM_SILLY_2 - upper 16 bits without leading 1 (first 8 bytes) - * 1000 0000 2222 2222 0000 0000 1111 1111 */ - return FIXNUM(townnameparts, lengthof(name_silly_1), 0) | FIXNUM(GB(townnameparts, 16, 8), lengthof(name_silly_2), 16); - } - return 0; -} -- cgit v1.2.3-70-g09d2