• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ err_here函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中err_here函数的典型用法代码示例。如果您正苦于以下问题:C++ err_here函数的具体用法?C++ err_here怎么用?C++ err_here使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了err_here函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: err_if

//--------- Begin of function Unit::init_sprite ---------//
//
// <int> startXLoc, startYLoc - the starting location of the unit
//
void Unit::init_sprite(int startXLoc, int startYLoc)
{
	Sprite::init( unit_res[unit_id]->sprite_id, startXLoc, startYLoc );			// BUGHERE use unit_id temporarily

	//-------- set loc_width and loc_height ------//

	loc_width  = (char) sprite_info->loc_width;
	loc_height = (char) sprite_info->loc_height;		// copy the vars for fast access

	// ###### begin Gilbert 30/4 ##########//
	move_to_loc_x = startXLoc; // * LOCATE_WIDTH;
	move_to_loc_y = startYLoc; // * LOCATE_HEIGHT; 
	// ###### end Gilbert 30/4 ##########//

	//-------- set the cargo_recno -------------//

	int w, h, x, y;

	err_if(!sprite_recno)      // sprite_recno must be initialized first before calling UnitB::init()
		err_here();

	for(h=0, y=startYLoc; h<loc_height; h++, y++)
	{
		for(w=0, x=startXLoc; w<loc_width; w++, x++)
		{
			err_if( !world.get_loc(x, y)->can_move(mobile_type) )    // it must be 0 to put the sprite in this location
				err_here();

			world.get_loc(x, y)->set_unit(sprite_recno, mobile_type);
		}
	}

	explore_area();
}
开发者ID:112212,项目名称:7k2,代码行数:38,代码来源:oun_init.cpp


示例2: err_here

//----------- Begin of function LinAlg::deinit --------//
//!
bool LinearAlgebra::quadratic_prog_not_converged(const Vector &v_x, const Vector &v_y, const Vector &v_Road, const Vector &v_Sigma, REAL gamma) {
    //const int MAX			= 100000;
    //const	REAL EPSILON	= 1.0/(10000000000);		// 10^-10
    const int MAX     = 1000000;
    const REAL EPSILON  = 1.0/(1000000);            // 10^-10

    if ( v_x.MaximumValue() > MAX ) {
#ifdef DEBUG_CONSOLE
	cout << ("LinAlg: Problem is primal unbounded:");
#endif

	err_here();
    }

    if ( v_y.MaximumValue() > MAX ) {
#ifdef DEBUG_CONSOLE
	cout << ("LinAlg: Problem is dual unbounded");
#endif
	err_here();
    }

    if ( v_Road.Sum() < EPSILON && v_Sigma.Sum() < EPSILON
	 && gamma < EPSILON
	)
	return false;
    else
	return true;
}
开发者ID:ndilday,项目名称:virtualu,代码行数:30,代码来源:Olinalg.cpp


示例3: err_when

//-------- Begin of function SeekPathReuse::move_outside_map ---------//
// location (preX, preY) is inside the map while location (curX, curY)
// is outside the map
//
// add one/two points
//
void SeekPathReuse::move_outside_map(int preX, int preY, int curX, int curY)
{
	err_when(preX<0 || preX>=MAX_WORLD_X_LOC || preY<0 || preY>=MAX_WORLD_Y_LOC);
	err_when(curX>=0 && curX<MAX_WORLD_X_LOC && curY>=0 && curY<MAX_WORLD_Y_LOC);

	int vecX = curX-preX;
	int vecY = curY-preY;
	if(vecX!=0) vecX /= abs(vecX);
	if(vecY!=0) vecY /= abs(vecY);

	int vertical=0;		// 1 for upper edge, 2 for lower edge
	int horizontal=0;		// 1 for left edge, 2 for right edge
	int xStep, yStep;
	if(curX<0)
	{
		xStep = preX;
		horizontal = 1;
	}
	else if(curX>=MAX_WORLD_X_LOC)
	{
		xStep = MAX_WORLD_X_LOC-preX-1;
		horizontal = 2;
	}
	else
		err_here();

	if(curY<0)
	{
		yStep = preY;
		vertical = 1;
	}
	else if(curY>=MAX_WORLD_Y_LOC)
	{
		yStep = MAX_WORLD_Y_LOC-preY-1;
		vertical = 2;
	}
	else
		err_here();

	err_when(xStep!=yStep);
	int addXLoc = preX+xStep*vecX;
	int addYLoc = preY+yStep*vecY;
	add_result(addXLoc, addYLoc); // add the first point

	//-*************** codes here ***************-//
	//---------------------------------------------------------------//
	// may add the second point if exit at the edge of the map
	//---------------------------------------------------------------//
	/*if((addXLoc==0 && addYLoc==0) ||
		(addXLoc==0 && addYLoc==MAX_WORLD_Y_LOC-1) ||
		(addXLoc==MAX_WORLD_X_LOC-1 && addYLoc==0) ||
		(addXLoc==MAX_WORLD_X_LOC-1 && addYLoc==MAX_WORLD_Y_LOC-1))
	{
		err_when(!vertical || !horizontal);
		return; // exit at corner
	}*/
}
开发者ID:AMDmi3,项目名称:7kaa,代码行数:63,代码来源:OSPREUSE.cpp


示例4: switch

void FirmOffensive::detect_main_menu()
{
	Firm::detect_info();

	if( !is_own() )
		return;

	String str;

	if( button_cast.detect() )
	{
		menu_mode_para = magic_id_upper_limit;
		se_ctrl.immediate_sound("TURN_ON");
		switch(magic_id_upper_limit) //bug
		{
			case MAGIC_FREEZE_LASER:
				cast_magic( MAGIC_FREEZE_LASER, center_x, center_y, 0, COMMAND_PLAYER );
				break;

			case MAGIC_GOD_POWER:
				menu_mode = FIRM_MAGIC_MENU_CAST;
				power.issue_command(COMMAND_FIRM_MAGIC, firm_recno, menu_mode_para);
				break;

			case MAGIC_LASER:
				cast_magic( MAGIC_LASER, center_x, center_y, 0, COMMAND_PLAYER );
				break;

			default:
				err_here();
		}
	}

	switch(magic_id_upper_limit) //bug
	{
		case MAGIC_FREEZE_LASER:
			help.set_help( INFO_X1+13, INFO_Y1+261, INFO_X1+13+44, INFO_Y1+280+48, "MAGIC7" );
			break;

		case MAGIC_GOD_POWER:
			help.set_help( INFO_X1+13, INFO_Y1+261, INFO_X1+13+44, INFO_Y1+280+48, "MAGIC6" );
			break;

		case MAGIC_LASER:
			help.set_help( INFO_X1+13, INFO_Y1+261, INFO_X1+13+44, INFO_Y1+280+48, "MAGIC5" );
			break;

		default:
			err_here();
	}
}
开发者ID:mecirt,项目名称:7k2,代码行数:51,代码来源:of_offi.cpp


示例5: err_here

//------------ Begin of function Tutor::get_intro -------------//
//
// <int> tutorId - id. of the tutorial
//
// return: <char*> return the introduction text of the tutorial.
//
char* Tutor::get_intro(int tutorId)
{
	//------- get the tutor msgs from the resource file -------//

	int   dataSize;
	File* filePtr = res_tutor_intro.get_file( tutor[tutorId]->code, dataSize);

	if( !filePtr )       // if error getting the tutor resource
	{
		err_here();
		return NULL;
	}

	//------ Open the file and allocate buffer -----//

	FileTxt fileTxt( filePtr, dataSize );  // initialize fileTxt with an existing file stream

	if( dataSize > tutor_intro_buf_size )
	{
		tutor_intro_buf      = mem_resize( tutor_intro_buf, dataSize );       // allocate a buffer larger than we need for the largest size possible
		tutor_intro_buf_size = dataSize;
	}

	// #### begin Gilbert 23/9 #######//
	fileTxt.read_paragraph(tutor_intro_buf, tutor_intro_buf_size);
	// #### end Gilbert 23/9 #######//

	return tutor_intro_buf;
}
开发者ID:Stummi,项目名称:7kaa,代码行数:35,代码来源:OTUTOR.cpp


示例6: switch

// ------- Begin of function Effect::update_abs_pos -------//
void Effect::update_abs_pos(SpriteFrame *spriteFrame)
{
	switch (program_effect_id)
	{
	case 0:
		Sprite::update_abs_pos(spriteFrame);
		break;

	case 1:
		abs_x1 = ZoomMatrix::calc_abs_x(cur_x, cur_y, get_z()) - 100;		// absolute position 
		abs_y1 = ZoomMatrix::calc_abs_y(cur_x, cur_y, get_z()) - 100;
		abs_x2 = abs_x1 + 200;
		abs_y2 = abs_y1 + 200;
		break;

	case 2:
		abs_x1 = ZoomMatrix::calc_abs_x(cur_x, cur_y, get_z()) - 50;		// absolute position 
		abs_y1 = ZoomMatrix::calc_abs_y(cur_x, cur_y, get_z()) - 25;
		abs_x2 = abs_x1 + 100;
		abs_y2 = abs_y1 + 50;
		break;

	case 3:
		abs_x1 = ZoomMatrix::calc_abs_x(cur_x, cur_y, get_z()) - 100;		// absolute position 
		abs_y1 = ZoomMatrix::calc_abs_y(cur_x, cur_y, get_z()) - 100;
		abs_x2 = abs_x1 + 200;
		abs_y2 = abs_y1 + 200;
		break;
	
	default:
		err_here();
		break;
	}
}
开发者ID:mecirt,项目名称:7k2,代码行数:35,代码来源:oeffect.cpp


示例7: switch

//--------- Begin of function UnitGod::cast_on_worker ---------//
//
// <Worker*> workerPtr - pointer to the worker to be affected by the effect.
//
void UnitGod::cast_on_worker(Worker* workerPtr, int nationRecno, int divider)
{
	switch(god_id)
	{
		case GOD_PERSIAN:
			persian_cast_power( workerPtr, nationRecno, divider );
			break;

		case GOD_JAPANESE:
			japanese_cast_power( workerPtr, nationRecno, divider );
			break;

		case GOD_MAYA:
			maya_cast_power( workerPtr, nationRecno, divider );
			break;

		case GOD_EGYPTIAN:
			egyptian_cast_power(workerPtr, nationRecno, divider);
			break;

		case GOD_INDIAN:
			indian_cast_power(workerPtr, nationRecno, divider);
			break;
	
		case GOD_ZULU:
			zulu_cast_power(workerPtr, nationRecno, divider);
			break;

		default:
			err_here();
	}
}
开发者ID:AMDmi3,项目名称:7kaa,代码行数:36,代码来源:OU_GOD.cpp


示例8: err_when

// -------- begin of function ItemRes::turn_off ----------//
//
void ItemRes::turn_off( Item &item )
{
	if( !item.id )
		return;
	err_when( item.id > ITEM_TYPE_COUNT );

	ItemInfo *itemInfo = item_info_array + item.id - 1;
	err_when( itemInfo->item_id != item.id );

	switch( itemInfo->para_type )
	{
	case ITEM_PARA_NONE:
	case ITEM_PARA_ENHANCE:
	case ITEM_PARA_USE:
	case ITEM_PARA_USE_MANUAL:
	case ITEM_PARA_CHARGE:
		break;

	case ITEM_PARA_USE_TIMED:
	case ITEM_PARA_CHARGE_TIMED:
		if( item.para < 0 )
			item.para = -item.para;
		break;

	default:
		err_here();
	}
}
开发者ID:112212,项目名称:7k2,代码行数:30,代码来源:oitemres.cpp


示例9: err_when

//----- Begin of function Nation::ai_process_talk_msg -----//
//
// action_para - recno of the message in talk_res.talk_msg_array.
//
int Nation::ai_process_talk_msg(ActionNode* actionNode)
{
	if( talk_res.is_talk_msg_deleted(actionNode->action_para) )		// if the talk message has been deleted
		return -1;

	TalkMsg* talkMsg = talk_res.get_talk_msg(actionNode->action_para);

	err_when( talkMsg->talk_id < 1 || talkMsg->talk_id > MAX_TALK_TYPE );

	err_when( talkMsg->from_nation_recno == nation_recno );
	err_when( talkMsg->to_nation_recno   != nation_recno );

	if( !talkMsg->is_valid_to_reply() )		// if it is no longer valid
		return -1;

	//----- call the consider function -------//

	if( talkMsg->reply_type == REPLY_WAITING )
	{
		int rc = consider_talk_msg(talkMsg);

		if( rc==1 )		// if rc is not 1 or 0, than the consider function have processed itself, no need to call reply_talk_msg() here
			talk_res.reply_talk_msg( actionNode->action_para, REPLY_ACCEPT, COMMAND_AI );

		else if( rc==0 )
			talk_res.reply_talk_msg( actionNode->action_para, REPLY_REJECT, COMMAND_AI );

		// don't reply if rc is neither 0 or 1
	}
	else
		err_here();

	return -1;		// always return -1 to remove the action from action_array. 
}
开发者ID:mecirt,项目名称:7k2,代码行数:38,代码来源:oai_talk.cpp


示例10: switch

int OptionMenu::slide_to_percent_volume(int slideVolume)
{
	switch( slideVolume / 10)
	{
	case 0:
		return slideVolume * 5;
	case 1:
	case 2:
	case 3:
		return slideVolume+40;
		break;

	case 4:
	case 5:
		return slideVolume/2 + 60;
		break;

	case 6:
	case 7:
	case 8:
	case 9:
	case 10:
		return slideVolume/4+75;
		break;

	default:
		err_here();
		return slideVolume;
	}
}
开发者ID:112212,项目名称:7k2,代码行数:30,代码来源:ooptmenu.cpp


示例11: switch

//-------- Begin of function Place::create_unit ---------//
//
// Create a unit on a given location.
//
// return: <int> recno of the unit created.
//
int Place::create_unit(int unitId)
{
	int xLoc, yLoc;

	if( !create_unit_locate_space(unitId, xLoc, yLoc) )
		return 0;

	//------------ add the unit now ----------------//

	int unitNationRecno;

	switch( obj_type )
	{
		case OBJ_TOWN:
			unitNationRecno = town_array[obj_extern_recno]->nation_recno;
			break;

		case OBJ_FIRM:
			unitNationRecno = firm_array[obj_extern_recno]->nation_recno;
			break;

		default:
			err_here();
	}

	int unitRecno = unit_array.add_unit( unitId, unitNationRecno, RANK_SOLDIER, 0, xLoc, yLoc );

	return unitRecno;
}
开发者ID:112212,项目名称:7k2,代码行数:35,代码来源:oplace.cpp


示例12: switch

//---------- Begin of function Student::update_history -----------//
//!
//! update history arrays
//!
//! update_flag		= UPDATE_TRIMESTER, UPDATE_MONTH, UPDATE_YEAR; (ooffice.h)
//!
void Student::update_history(char update_flag) {
    switch (update_flag) {
    case UPDATE_MONTH:
	calc_satisfaction_student_life();
	calc_satisfaction_athletics();
	calc_satisfaction_overall();
	calc_faculty_workweek();
	break;
    case UPDATE_TRIMESTER:
	calc_satisfaction_academic();

	// called when value is needed
	//calc_probability_change_major();
	//calc_multiplier_on_dropout_prob();
	break;
    case UPDATE_YEAR:
	reaction_summer_course_last = reaction_summer_course;
	break;
    case UPDATE_ALL:
	update_history(UPDATE_MONTH);
	update_history(UPDATE_TRIMESTER);
	update_history(UPDATE_YEAR);
	break;
    default:
	err_here();
	break;
    }
}
开发者ID:ndilday,项目名称:virtualu,代码行数:34,代码来源:Ostud_pi.cpp


示例13: err_here

//--------- Begin of function Sprite::init ---------//
void Sprite::init(short spriteId, short startXLoc, short startYLoc, char startSubXLoc, char startSubYLoc) {
    sprite_id = spriteId;

    go_x = next_x = cur_x = startXLoc;
    go_y = next_y = cur_y = startYLoc;

    /*
      cur_attack = 0;
      cur_action = SPRITE_IDLE;
      cur_dir 	  = m.random(GameDef::MAX_SPRITE_DIR_TYPE);	// facing any of the eight directions
      cur_frame  = 1;
      final_dir  = cur_dir;
    */

    //----- clone vars from sprite_res for fast access -----//
    sprite_id = 1;                                  //temp
    err_here();
    //990511		sprite_info = sprite_res[sprite_id];

    sprite_info->load_bitmap_res();

    //----- set the sprite's location & absolute positions on the map -----//

    set_abs(ZOOM_SMALL , MAP_LOC_WIDTH   , MAP_LOC_HEIGHT);
    set_abs(ZOOM_MEDIUM, ZOOM1_LOC_WIDTH, ZOOM1_LOC_HEIGHT);
    set_abs(ZOOM_LARGE , ZOOM2_LOC_WIDTH, ZOOM2_LOC_HEIGHT);

    will_not_move_next_process = 0;
}
开发者ID:ndilday,项目名称:virtualu,代码行数:30,代码来源:Osprite.cpp


示例14: if

//---------- Begin of function PlayerSchool::init_sub_score_weight -----------//
//!
//! subScoreGroup between 0 and SCORE_SUBGROUP_COUNT
//! or -1 means update all sub_score_weight
//!
void PlayerSchool::init_sub_score_weight(int subScoreGroup) {
    int i;
    if( subScoreGroup < 0 ) {
	for( i = 0; i < SCORE_VAR_COUNT; ++i )
	    sub_score_weight[i] = default_sub_score_weight[i] * 100;
    }
    else if( subScoreGroup == 0 ) {
	for( i = GROUP1_BEGIN_ID; i < GROUP2_BEGIN_ID; ++i )
	    sub_score_weight[i] = default_sub_score_weight[i] * 100;
    }
    else if( subScoreGroup == 1 ) {
	for( i = GROUP2_BEGIN_ID; i < GROUP3_BEGIN_ID; ++i )
	    sub_score_weight[i] = default_sub_score_weight[i] * 100;
    }
    else if( subScoreGroup == 2 ) {
	for( i = GROUP3_BEGIN_ID; i < GROUP4_BEGIN_ID; ++i )
	    sub_score_weight[i] = default_sub_score_weight[i] * 100;
    }
    else if( subScoreGroup == 3 ) {
	for( i = GROUP4_BEGIN_ID; i < SCORE_VAR_COUNT; ++i )
	    sub_score_weight[i] = default_sub_score_weight[i] * 100;
    }
    else {
	err_here();
    }
}
开发者ID:ndilday,项目名称:virtualu,代码行数:31,代码来源:Opsch_pi.cpp


示例15: to_nation_name

//----- Begin of function TalkMsg::end_treaty ------//
//
// talk_para1 - treaty type, RELATION_FRIENDLY or RELATION_ALLIANCE.
//
void TalkMsg::end_treaty(const char* treatyTypeStr)
{
	//---------------------------------------------//
	//
	// Send:
	// <King>'s Kingdom terminates its friendly/alliance treaty with you.
	// You terminate your friendly/alliance treaty with <King>'s Kingdom.
	//
	//---------------------------------------------//

/*
	if( viewing_nation_recno == from_nation_recno )
	{
		str  = "You terminate your ";
		str += treatyTypeStr;
		str += " treaty with ";
		str +=  to_nation_name();
		str += ".";
	}
	else
	{
		str  = from_nation_name();
		str += " terminates its ";
		str += treatyTypeStr;
		str += " treaty with you.";
	}
*/
	switch( talk_id )
	{
	case TALK_END_TRADE_TREATY:
		if( viewing_nation_recno == from_nation_recno )
			str = text_talk.process( text_talk.get_format_str( 29, "YETT" ),
				to_nation_name() );
		else
			str = text_talk.process( text_talk.get_format_str( 30, "NETT" ),
				from_nation_name() );
		break;
	case TALK_END_FRIENDLY_TREATY:
		if( viewing_nation_recno == from_nation_recno )
			str = text_talk.process( text_talk.get_format_str( 31, "YEFT" ),
				to_nation_name() );
		else
			str = text_talk.process( text_talk.get_format_str( 32, "NEFT" ),
				from_nation_name() );
		break;
	case TALK_END_ALLIANCE_TREATY:
		if( viewing_nation_recno == from_nation_recno )
			str = text_talk.process( text_talk.get_format_str( 33, "YEAT" ),
				to_nation_name() );
		else
			str = text_talk.process( text_talk.get_format_str( 34, "NEAT" ),
				from_nation_name() );
		break;
	default:
		err_here();
		str = "";
	}
}
开发者ID:112212,项目名称:7k2,代码行数:62,代码来源:otalkeng.cpp


示例16: err_when

//--------- Begin of function CaravanStop::mp_pick_up_toggle ---------//
void CaravanStop::mp_pick_up_toggle(int pos)
{
	err_when(firm_array.is_deleted(firm_recno));
	//------------------------------------------------------------//
	// verify for cargo button
	// if not exist then return else call pick_up_toggle(int pos)
	//------------------------------------------------------------//

	Firm *firmPtr = firm_array[firm_recno];
	MarketGoods *marketGoodsPtr;
	int	cargoExist = 0;
	int	id, i;

	switch(firmPtr->firm_id)
	{
		case FIRM_MINE:
				id = ((FirmMine*)firmPtr)->raw_id+PICK_UP_RAW_FIRST-1;
				if(id==pos)
					cargoExist = 1;
				break;

		case FIRM_FACTORY:
				id = ((FirmFactory*)firmPtr)->product_raw_id+PICK_UP_PRODUCT_FIRST-1;
				if(id==pos)
					cargoExist = 1;
				break;

		case FIRM_MARKET:
				marketGoodsPtr = ((FirmMarket*) firmPtr)->market_goods_array;
				for(i=1; i<=MAX_MARKET_GOODS; i++, marketGoodsPtr++)
				{
					if((id = marketGoodsPtr->raw_id)) // 1-3
					{
						if(id==pos)
						{
							cargoExist = 1;
							break;
						}
					}
					else if((id = marketGoodsPtr->product_raw_id)) // 1-3
					{
						id += MAX_PRODUCT;	// 4-6
						if(id==pos)
						{
							cargoExist = 1;
							break;
						}
					}
				}
				break;

		default:	err_here();
					break;
	}

	if(cargoExist)
		pick_up_toggle(pos);
}
开发者ID:AMDmi3,项目名称:7kaa,代码行数:59,代码来源:OU_CARAS.cpp


示例17: err_here

//--------- Begin of function Sprite::set_next --------//
//
int Sprite::set_next(int nextX, int nextY, int para, int blockedChecked)
{
	err_here();		//**BUGHERE, for now, we don't have any pure Sprites, all functions should call Unit::set_next() instead of Sprite::set_next()

	next_x = nextX;
	next_y = nextY;

	return 1;
}
开发者ID:mecirt,项目名称:7k2,代码行数:11,代码来源:osprite2.cpp


示例18: switch

// ------ begin of function ScenarioEditor::disp_view -------//
//
// disp zoom area
//
void ScenarioEditor::disp_view()
{
	char useBack = vga.use_back_buf;
	vga.use_back();

	switch( edit_mode )
	{
	case SEDIT_MODE_NONE:
		break;

//	case SEDIT_MODE_TERRAIN:
//		disp_terrain_view();
//		break;

	case SEDIT_MODE_HUMAN:
		disp_human_view();
		break;

	case SEDIT_MODE_MONSTER:
		disp_monster_view();
		break;

	case SEDIT_MODE_MISC:
		disp_misc_view();
		break;

	case SEDIT_MODE_EDIT:
		disp_edit_view();
		break;

//	case SEDIT_MODE_DEFINE:
//		disp_define_view();
//		break;

	case SEDIT_MODE_PLAYER:
		disp_players_view();
		break;

	case SEDIT_MODE_DIPLOMACY:
		disp_diplomacy_view();
		break;

	case SEDIT_MODE_VICTORY:
		disp_victory_view();
		break;

	case SEDIT_MODE_HERO:
		disp_hero_view();
		break;

	default:
		err_here();
	}

	if( !useBack )
		vga.use_front();
}
开发者ID:112212,项目名称:7k2,代码行数:61,代码来源:oseditor.cpp


示例19: err_here

//------------ function debug_check_smode_node() -------------//
void SeekPathReuse::debug_check_smode_node(int x, int y)
{
	if(reuse_search_sub_mode!=SEARCH_SUB_MODE_PASSABLE)
		return;

	Location *locPtr = world.get_loc(x, y);
	if(locPtr->power_nation_recno && !reuse_nation_passable[locPtr->power_nation_recno])
		err_here();
}
开发者ID:AMDmi3,项目名称:7kaa,代码行数:10,代码来源:OSPREDBG.cpp


示例20: switch

// ------ begin of function ScenarioEditor::disp -------//
//
// display interface area
//
void ScenarioEditor::disp( int refreshFlag )
{
	if( edit_mode != SEDIT_MODE_NONE )
		vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("SCEN-ED") );

	switch( edit_mode )
	{
	case SEDIT_MODE_NONE:
		break;

//	case SEDIT_MODE_TERRAIN:
//		disp_terrain_main(refreshFlag);
//		break;

	case SEDIT_MODE_HUMAN:
		disp_human_main(refreshFlag);
		break;

	case SEDIT_MODE_MONSTER:
		disp_monster_main(refreshFlag);
		break;

	case SEDIT_MODE_MISC:
		disp_misc_main(refreshFlag);
		break;

	case SEDIT_MODE_EDIT:
		disp_edit_main(refreshFlag);
		break;

//	case SEDIT_MODE_DEFINE:
//		disp_define_main(refreshFlag);
//		break;

	case SEDIT_MODE_PLAYER:
		disp_players_main(refreshFlag);
		break;

	case SEDIT_MODE_DIPLOMACY:
		disp_diplomacy_main(refreshFlag);
		break;

	case SEDIT_MODE_VICTORY:
		disp_victory_main(refreshFlag);
		break;

	case SEDIT_MODE_HERO:
		disp_hero_main(refreshFlag);
		break;

	default:
		err_here();
	}
}
开发者ID:mecirt,项目名称:7k2,代码行数:58,代码来源:oseditor.cpp



注:本文中的err_here函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ err_is_fail函数代码示例发布时间:2022-05-30
下一篇:
C++ err_exit函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap