⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 game_conv.c

📁 打魔兽战网的都知道他是什么
💻 C
📖 第 1 页 / 共 3 页
字号:
		return game_option_melee_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Warcraft II bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_ffa:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_FFA_NORMAL:		return game_option_ffa_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Warcraft II bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_oneonone:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_ONEONONE_NORMAL:		return game_option_oneonone_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Warcraft II bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_ladder:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_LADDER_COUNTASLOSS:		return game_option_ladder_countasloss;	    case CLIENT_STARTGAME4_OPTION_LADDER_NOPENALTY:		return game_option_ladder_nopenalty;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Warcraft II bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_ironman:	    switch (bngoption)	    {	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Warcraft II bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_mapset:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_MAPSET_NORMAL:		return game_option_mapset_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Warcraft II bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	default:	    eventlog(eventlog_level_error,__FUNCTION__,"unknown Warcraft II game type \"%s\" %u",tag_uint_to_str(clienttag_str,clienttag),(unsigned int)gtype);	    return game_option_none;	}    }    else if (clienttag==CLIENTTAG_DIABLO2DV_UINT ||	     clienttag==CLIENTTAG_DIABLO2XP_UINT)    {	switch (gtype)	{	case game_type_diablo2open:	    switch (bngoption)	    {            case CLIENT_STARTGAME4_OPTION_NONE: /* FIXME: really? */                return game_option_none;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Diablo II bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_diablo2closed:	    switch (bngoption)	    {            case CLIENT_STARTGAME4_OPTION_NONE: /* FIXME: really? */                return game_option_none;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Diablo II bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	default:	    eventlog(eventlog_level_error,__FUNCTION__,"unknown Diablo II game type \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),(unsigned int)gtype);	    return game_option_none;	}    }    else if (clienttag==CLIENTTAG_DIABLORTL_UINT ||	     clienttag==CLIENTTAG_DIABLOSHR_UINT)    {	switch (gtype)	{	case game_type_diablo:	    switch (bngoption)	    {	    default:		/* diablo doesn't use any options */		return game_option_none;	    }	default:	    eventlog(eventlog_level_error,__FUNCTION__,"unknown Diablo game type \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),(unsigned int)gtype);	    return game_option_none;	}    }    else if (clienttag==CLIENTTAG_STARCRAFT_UINT ||	     clienttag==CLIENTTAG_BROODWARS_UINT ||	     clienttag==CLIENTTAG_SHAREWARE_UINT)    {	switch (gtype)	{	case game_type_melee:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_MELEE_NORMAL:		return game_option_melee_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_ffa:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_FFA_NORMAL:		return game_option_ffa_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_oneonone:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_ONEONONE_NORMAL:		return game_option_oneonone_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_ctf:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_CTF_NORMAL:		return game_option_ctf_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_greed:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_GREED_10000:		return game_option_greed_10000;	    case CLIENT_STARTGAME4_OPTION_GREED_7500:		return game_option_greed_7500;	    case CLIENT_STARTGAME4_OPTION_GREED_5000:		return game_option_greed_5000;	    case CLIENT_STARTGAME4_OPTION_GREED_2500:		return game_option_greed_2500;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_slaughter:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_SLAUGHTER_60:		return game_option_slaughter_60;	    case CLIENT_STARTGAME4_OPTION_SLAUGHTER_45:		return game_option_slaughter_45;	    case CLIENT_STARTGAME4_OPTION_SLAUGHTER_30:		return game_option_slaughter_30;	    case CLIENT_STARTGAME4_OPTION_SLAUGHTER_15:		return game_option_slaughter_15;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_sdeath:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_SDEATH_NORMAL:		return game_option_sdeath_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_ladder:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_LADDER_COUNTASLOSS:		return game_option_ladder_countasloss;	    case CLIENT_STARTGAME4_OPTION_LADDER_NOPENALTY:		return game_option_ladder_nopenalty;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_mapset:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_MAPSET_NORMAL:		return game_option_mapset_normal;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_teammelee:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_TEAMMELEE_4:		return game_option_teammelee_4;	    case CLIENT_STARTGAME4_OPTION_TEAMMELEE_3:		return game_option_teammelee_3;	    case CLIENT_STARTGAME4_OPTION_TEAMMELEE_2:		return game_option_teammelee_2;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_teamffa:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_TEAMFFA_4:		return game_option_teamffa_4;	    case CLIENT_STARTGAME4_OPTION_TEAMFFA_3:		return game_option_teamffa_3;	    case CLIENT_STARTGAME4_OPTION_TEAMFFA_2:		return game_option_teamffa_2;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_teamctf:	    switch (bngoption)	    {	    case CLIENT_STARTGAME4_OPTION_TEAMCTF_4:		return game_option_teamctf_4;	    case CLIENT_STARTGAME4_OPTION_TEAMCTF_3:		return game_option_teamctf_3;	    case CLIENT_STARTGAME4_OPTION_TEAMCTF_2:		return game_option_teamctf_2;	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_pgl:	    switch (bngoption)	    {	    default:		eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_topvbot:	    switch (bngoption)	    {	      case CLIENT_STARTGAME4_OPTION_TOPVBOT_1:	        return game_option_topvbot_1;	      case CLIENT_STARTGAME4_OPTION_TOPVBOT_2:		return game_option_topvbot_2;	      case CLIENT_STARTGAME4_OPTION_TOPVBOT_3:	        return game_option_topvbot_3;	      case CLIENT_STARTGAME4_OPTION_TOPVBOT_4:		return game_option_topvbot_4;	      case CLIENT_STARTGAME4_OPTION_TOPVBOT_5:	        return game_option_topvbot_5;	      case CLIENT_STARTGAME4_OPTION_TOPVBOT_6:		return game_option_topvbot_6;	      case CLIENT_STARTGAME4_OPTION_TOPVBOT_7:	        return game_option_topvbot_7;            default:	     eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft bnet game option for \"%s\" game \"%s\" %hu",tag_uint_to_str(clienttag_str,clienttag),game_type_get_str(gtype),bngoption);		return game_option_none;	    }	case game_type_none:	default:	    eventlog(eventlog_level_error,__FUNCTION__,"unknown Starcraft game type \"%s\" %u(%s)",tag_uint_to_str(clienttag_str,clienttag),(unsigned int)gtype,game_type_get_str(gtype));	    return game_option_none;	}    }    else if (clienttag==CLIENTTAG_WARCRAFT3_UINT ||	     clienttag==CLIENTTAG_WAR3XP_UINT)    { 	return game_option_none;    }    else    {	eventlog(eventlog_level_error,__FUNCTION__,"unknown game tag_uint_to_str(clienttag_str,clienttag) \"%s\" %u",clienttag,(unsigned int)gtype);	return game_option_none;    }}extern t_game_result bngresult_to_gresult(unsigned int bngresult){    switch (bngresult)    {    case CLIENT_GAME_REPORT_RESULT_PLAYING:	return game_result_playing;    case CLIENT_GAME_REPORT_RESULT_WIN:	return game_result_win;    case CLIENT_GAME_REPORT_RESULT_LOSS:	return game_result_loss;    case CLIENT_GAME_REPORT_RESULT_DRAW:	return game_result_draw;    case CLIENT_GAME_REPORT_RESULT_DISCONNECT:	return game_result_disconnect;    case CLIENT_GAME_REPORT_RESULT_OBSERVER:	return game_result_observer;    default:	eventlog(eventlog_level_error,__FUNCTION__,"unknown bnet game result %u",bngresult);	return game_result_disconnect; /* bad packet? */    }}extern t_game_maptype bngmaptype_to_gmaptype(unsigned int bngmaptype){    switch (bngmaptype)    {    case CLIENT_MAPTYPE_SELFMADE:        return game_maptype_selfmade;    case CLIENT_MAPTYPE_BLIZZARD:        return game_maptype_blizzard;    case CLIENT_MAPTYPE_LADDER:        return game_maptype_ladder;    case CLIENT_MAPTYPE_PGL:        return game_maptype_pgl;    case CLIENT_MAPTYPE_KBK:	return game_maptype_kbk;    case CLIENT_MAPTYPE_CompUSA:	return game_maptype_compusa;    default:        return game_maptype_none;    }}extern t_game_tileset bngtileset_to_gtileset(unsigned int bngtileset){    switch (bngtileset)    {    case CLIENT_TILESET_BADLANDS:        return game_tileset_badlands;    case CLIENT_TILESET_SPACE:        return game_tileset_space;    case CLIENT_TILESET_INSTALLATION:        return game_tileset_installation;    case CLIENT_TILESET_ASHWORLD:        return game_tileset_ashworld;    case CLIENT_TILESET_JUNGLE:        return game_tileset_jungle;    case CLIENT_TILESET_DESERT:        return game_tileset_desert;    case CLIENT_TILESET_ICE:        return game_tileset_ice;    case CLIENT_TILESET_TWILIGHT:        return game_tileset_twilight;    default:        return game_tileset_none;    }}extern t_game_speed bngspeed_to_gspeed(unsigned int bngspeed){    switch (bngspeed)    {    case CLIENT_GAMESPEED_SLOWEST:        return game_speed_slowest;    case CLIENT_GAMESPEED_SLOWER:        return game_speed_slower;    case CLIENT_GAMESPEED_SLOW:        return game_speed_slow;    case CLIENT_GAMESPEED_NORMAL:        return game_speed_normal;    case CLIENT_GAMESPEED_FAST:        return game_speed_fast;    case CLIENT_GAMESPEED_FASTER:        return game_speed_faster;    case CLIENT_GAMESPEED_FASTEST:        return game_speed_fastest;    default:        return game_speed_none;    }}t_game_speed w3speed_to_gspeed(unsigned int w3speed){    switch (w3speed)    {    case 0: return game_speed_slow;    case 1: return game_speed_normal;    case 2: return game_speed_fast;    default: return game_speed_none;    }}extern t_game_difficulty bngdifficulty_to_gdifficulty(unsigned int bngdifficulty){    switch (bngdifficulty)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -