comparison mm7_3.cpp @ 510:7c86030324a5

Слияние
author Ritor1
date Fri, 01 Mar 2013 18:38:12 +0600
parents dddedef7a98e dd5124185551
children cb0ad52d6a26
comparison
equal deleted inserted replaced
509:dddedef7a98e 510:7c86030324a5
13954 { 13954 {
13955 case 2: 13955 case 2:
13956 { 13956 {
13957 if ( !_strnicmp(test_string, "wea", 3) ) 13957 if ( !_strnicmp(test_string, "wea", 3) )
13958 { 13958 {
13959 p2DEvents[i].uType = 1; 13959 p2DEvents[i].uType = BildingType_WeaponShop;
13960 break; 13960 break;
13961 } 13961 }
13962 if ( !_strnicmp(test_string, "arm", 3) ) 13962 if ( !_strnicmp(test_string, "arm", 3) )
13963 { 13963 {
13964 p2DEvents[i].uType = 2; 13964 p2DEvents[i].uType = BildingType_ArmorShop;
13965 break; 13965 break;
13966 } 13966 }
13967 if ( !_strnicmp(test_string, "mag", 3) ) 13967 if ( !_strnicmp(test_string, "mag", 3) )
13968 { 13968 {
13969 p2DEvents[i].uType = 3; 13969 p2DEvents[i].uType = BildingType_MagicShop;
13970 break; 13970 break;
13971 } 13971 }
13972 if ( !_strnicmp(test_string, "alc", 3) ) 13972 if ( !_strnicmp(test_string, "alc", 3) )
13973 { 13973 {
13974 p2DEvents[i].uType = 4; 13974 p2DEvents[i].uType = BildingType_AlchemistShop;
13975 break; 13975 break;
13976 } 13976 }
13977 if ( !_strnicmp(test_string, "sta", 3) ) 13977 if ( !_strnicmp(test_string, "sta", 3) )
13978 { 13978 {
13979 p2DEvents[i].uType = 27; 13979 p2DEvents[i].uType = BildingType_Stables;
13980 break; 13980 break;
13981 } 13981 }
13982 if ( !_strnicmp(test_string, "boa", 3) ) 13982 if ( !_strnicmp(test_string, "boa", 3) )
13983 { 13983 {
13984 p2DEvents[i].uType = 28; 13984 p2DEvents[i].uType = BildingType_Boats;
13985 break; 13985 break;
13986 } 13986 }
13987 if ( !_strnicmp(test_string, "tem", 3) ) 13987 if ( !_strnicmp(test_string, "tem", 3) )
13988 { 13988 {
13989 p2DEvents[i].uType = 23; 13989 p2DEvents[i].uType = BildingType_Temple;
13990 break; 13990 break;
13991 } 13991 }
13992 if ( !_strnicmp(test_string, "tra", 3) ) 13992 if ( !_strnicmp(test_string, "tra", 3) )
13993 { 13993 {
13994 p2DEvents[i].uType = 30; 13994 p2DEvents[i].uType = BildingType_Training;
13995 break; 13995 break;
13996 } 13996 }
13997 if ( !_strnicmp(test_string, "tow", 3) ) 13997 if ( !_strnicmp(test_string, "tow", 3) )
13998 { 13998 {
13999 p2DEvents[i].uType = 17; 13999 p2DEvents[i].uType = BildingType_TownHall;
14000 break; 14000 break;
14001 } 14001 }
14002 14002
14003 if ( !_strnicmp(test_string, "tav", 3) ) 14003 if ( !_strnicmp(test_string, "tav", 3) )
14004 { 14004 {
14005 p2DEvents[i].uType = 21; 14005 p2DEvents[i].uType = BildingType_Tavern;
14006 break; 14006 break;
14007 } 14007 }
14008 if ( !_strnicmp(test_string, "ban", 3) ) 14008 if ( !_strnicmp(test_string, "ban", 3) )
14009 { 14009 {
14010 p2DEvents[i].uType = 22; 14010 p2DEvents[i].uType = BildingType_Bank;
14011 break; 14011 break;
14012 } 14012 }
14013 if ( !_strnicmp(test_string, "fir", 3) ) 14013 if ( !_strnicmp(test_string, "fir", 3) )
14014 { 14014 {
14015 p2DEvents[i].uType = 5; 14015 p2DEvents[i].uType = BildingType_FireGuild;
14016 break; 14016 break;
14017 } 14017 }
14018 if ( !_strnicmp(test_string, "air", 3) ) 14018 if ( !_strnicmp(test_string, "air", 3) )
14019 { 14019 {
14020 p2DEvents[i].uType = 6; 14020 p2DEvents[i].uType = BildingType_AirGuild;
14021 break; 14021 break;
14022 } 14022 }
14023 if ( !_strnicmp(test_string, "wat", 3) ) 14023 if ( !_strnicmp(test_string, "wat", 3) )
14024 { 14024 {
14025 p2DEvents[i].uType = 7; 14025 p2DEvents[i].uType = BildingType_WaterGuild;
14026 break; 14026 break;
14027 } 14027 }
14028 if ( !_strnicmp(test_string, "ear", 3) ) 14028 if ( !_strnicmp(test_string, "ear", 3) )
14029 { 14029 {
14030 p2DEvents[i].uType = 8; 14030 p2DEvents[i].uType = BildingType_EarthGuild;
14031 break; 14031 break;
14032 } 14032 }
14033 if ( !_strnicmp(test_string, "spi", 3) ) 14033 if ( !_strnicmp(test_string, "spi", 3) )
14034 { 14034 {
14035 p2DEvents[i].uType = 9; 14035 p2DEvents[i].uType = BildingType_SpiritGuild;
14036 break; 14036 break;
14037 } 14037 }
14038 if ( !_strnicmp(test_string, "min", 3) ) 14038 if ( !_strnicmp(test_string, "min", 3) )
14039 { 14039 {
14040 p2DEvents[i].uType = 10; 14040 p2DEvents[i].uType = BildingType_MindGuild;
14041 break; 14041 break;
14042 } 14042 }
14043 if ( !_strnicmp(test_string, "bod", 3) ) 14043 if ( !_strnicmp(test_string, "bod", 3) )
14044 { 14044 {
14045 p2DEvents[i].uType = 11; 14045 p2DEvents[i].uType = BildingType_BodyGuild;
14046 break; 14046 break;
14047 } 14047 }
14048 if ( !_strnicmp(test_string, "lig", 3) ) 14048 if ( !_strnicmp(test_string, "lig", 3) )
14049 { 14049 {
14050 p2DEvents[i].uType = 12; 14050 p2DEvents[i].uType = BildingType_LightGuild;
14051 break; 14051 break;
14052 } 14052 }
14053 if ( !_strnicmp(test_string, "dar", 3) ) 14053 if ( !_strnicmp(test_string, "dar", 3) )
14054 { 14054 {
14055 p2DEvents[i].uType = 13; 14055 p2DEvents[i].uType = BildingType_DarkGuild;
14056 break; 14056 break;
14057 } 14057 }
14058 if ( !_strnicmp(test_string, "ele", 3) ) 14058 if ( !_strnicmp(test_string, "ele", 3) )
14059 { 14059 {
14060 p2DEvents[i].uType = 14; 14060 p2DEvents[i].uType = BildingType_14;
14061 break; 14061 break;
14062 } 14062 }
14063 if ( !_strnicmp(test_string, "sel", 3) ) 14063 if ( !_strnicmp(test_string, "sel", 3) )
14064 { 14064 {
14065 p2DEvents[i].uType = 15; 14065 p2DEvents[i].uType = BildingType_15;
14066 break; 14066 break;
14067 } 14067 }
14068 if ( !_strnicmp(test_string, "mir", 3) ) 14068 if ( !_strnicmp(test_string, "mir", 3) )
14069 { 14069 {
14070 p2DEvents[i].uType = 16; 14070 p2DEvents[i].uType = BildingType_16;
14071 break; 14071 break;
14072 } 14072 }
14073 if ( !_strnicmp(test_string, "mer", 3) ) 14073 if ( !_strnicmp(test_string, "mer", 3) )
14074 { 14074 {
14075 p2DEvents[i].uType = 17; 14075 p2DEvents[i].uType = BildingType_TownHall;
14076 break; 14076 break;
14077 } 14077 }
14078 p2DEvents[i].uType = 18; 14078 p2DEvents[i].uType = BildingType_18;
14079 } 14079 }
14080 break; 14080 break;
14081 14081
14082 case 4: 14082 case 4:
14083 p2DEvents[i].uAnimationID = atoi(test_string); 14083 p2DEvents[i].uAnimationID = atoi(test_string);
16402 a7b = v15; 16402 a7b = v15;
16403 16403
16404 LayingItem a1; // [sp+38h] [bp-7Ch]@12 16404 LayingItem a1; // [sp+38h] [bp-7Ch]@12
16405 //LayingItem::LayingItem(&a1); 16405 //LayingItem::LayingItem(&a1);
16406 16406
16407 a1.uItemType = stru_4E3ACC[spellnum_].uItemType; 16407 a1.uItemType = stru_4E3ACC[spellnum_].field_0;
16408 if ( spellnum_ > 58 ) 16408 if ( spellnum_ > 58 )
16409 { 16409 {
16410 if ( spellnum_ == 69 ) 16410 if ( spellnum_ == 69 )
16411 goto LABEL_117; 16411 goto LABEL_117;
16412 if ( spellnum_ != 83 ) 16412 if ( spellnum_ != 83 )
17084 { 17084 {
17085 return a1[(a2 - 1) >> 3] & (0x80u >> (a2 - 1) % 8); 17085 return a1[(a2 - 1) >> 3] & (0x80u >> (a2 - 1) % 8);
17086 } 17086 }
17087 17087
17088 //----- (00449B7E) -------------------------------------------------------- 17088 //----- (00449B7E) --------------------------------------------------------
17089 unsigned char *_449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle) 17089 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
17090 { 17090 {
17091 signed int v3; // esi@1 17091 signed int v3; // esi@1
17092 unsigned char *result; // eax@1 17092 unsigned char set_bit; // edx@1
17093 unsigned int v5; // edx@1
17094 17093
17095 v3 = a2 - 1; 17094 v3 = a2 - 1;
17096 result = &pArray[v3 / 8]; 17095 set_bit = 0x80 >> v3 % 8;
17097 v5 = 0x80 >> v3 % 8;
17098 if ( bToggle ) 17096 if ( bToggle )
17099 *result |= v5; 17097 pArray[v3 / 8] |= set_bit;
17100 else 17098 else
17101 *result &= ~(unsigned char)v5; 17099 pArray[v3 / 8] &= ~set_bit;
17102 return result;
17103 } 17100 }
17104 17101
17105 17102
17106 //----- (0044A56A) -------------------------------------------------------- 17103 //----- (0044A56A) --------------------------------------------------------
17107 void __cdecl sub_44A56A() 17104 void __cdecl sub_44A56A()