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

C++ set_flag函数代码示例

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

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



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

示例1: bitmap_set

static void bitmap_set(FS *fs, LOCATION location, int allocated)
{
    unsigned long int bitmap_num = location / fs->bitmap_size;
    unsigned long int bitmap_offset = location % fs->bitmap_size;
    unsigned long int bitmap_byte = bitmap_offset / 8;
    unsigned long int bitmap_bit = bitmap_offset % 8;
    BLOCK *bitmap;
    unsigned char *byte;
    int prev;

    if (fs->bitmaps[bitmap_num] == 0)
    {
        bitmap = allocate_block(fs, B_BITMAP, 0);
        fs->bitmaps[bitmap_num] = bitmap->location;
        bitmap_set(fs, bitmap->location, 1);
        set_flag(fs->superblock, F_DIRTY);
    }
    else
        bitmap = get_block(fs, fs->bitmaps[bitmap_num], 1);
    
    byte = (unsigned char *) bitmap->buffer + sizeof(struct bitmap_block_header) + bitmap_byte;
    prev = (*byte & (1 << bitmap_bit)) != 0;
    if (allocated)
        *byte = *byte | (1 << bitmap_bit);
    else
        *byte = *byte & ~(1 << bitmap_bit);
    set_flag(bitmap, F_DIRTY);
    
    if (prev == allocated)
        error("Not toggling bit!\n");
    
    //printf("Set bit %ld to %d from %d\n", location, allocated, prev);
}
开发者ID:ejrh,项目名称:ejrh,代码行数:33,代码来源:block.c


示例2: g1_building_class

g1_factory_class::g1_factory_class(g1_object_type g1_ot_id, g1_loader_class * g1_lc_fp)
	: g1_building_class(g1_ot_id,g1_lc_fp) //, death(this) // JJ modification not to issue MSVC warning
{
	//death.SetG1_Object_Class(this); // JJ modification not to issue MSVC warning
	char * n=name();
	char lod_n[256];

	sprintf(lod_n, "%s_lod", n);
	draw_params.setup(n,0,lod_n);

	set_flag(BLOCKING      |
			 CAN_DRIVE_ON  |
			 TARGETABLE    |
			 GROUND
			 ,1);
	if (!strcmp(n, "garage"))
	{
		radar_image=&garage_radar_im;
		set_flag(CAN_DRIVE_ON,0);
	}
	else if (!strcmp(n, "airbase"))
	{
		radar_image=&airbase_radar_im;
		set_flag(CAN_DRIVE_ON,0); //this must not be true, otherwise planes might crash into it when starting
	}
	else if (!strcmp(n, "mainbasepad"))
	{
		radar_image=&mainbasepad_radar_im;
	}

	radar_type=G1_RADAR_BUILDING;

}
开发者ID:pgrawehr,项目名称:golgotha,代码行数:33,代码来源:objs__bases.cpp


示例3: set_flag

BLOCK *clone_block(FS *fs, BLOCK *block)
{
    BLOCK *clone;
    
    if (block->pins == 0 && !(block->flags & F_DIRTY))
    {
        set_flag(block, F_CLONE);
        remove_block_from_hash(fs, block);
        return block;
    }
    
    clone = find_free_slot(fs);
    memcpy(clone->buffer, block->buffer, fs->block_size);
    set_flag(clone, F_CACHED);
    set_flag(clone, F_CLONE);
    clone->type = block->type;
    clone->location = block->location;
    if (block->type != B_DATA)
    {
        if (!parse_block(fs, clone))
        {
            printf("Error parsing cloned block %ld\n", block->location);
            return NULL;
        }
    }
    
    return clone;
}
开发者ID:ejrh,项目名称:ejrh,代码行数:28,代码来源:block.c


示例4: parse_flags_option

static int parse_flags_option(struct isl_arg *decl, char **arg,
	struct isl_prefixes *prefixes, void *opt)
{
	int has_argument;
	const char *flags;
	const char *comma;
	unsigned val;

	flags = skip_name(decl, arg[0], prefixes, 0, &has_argument);
	if (!flags)
		return 0;

	if (!has_argument && !arg[1])
		return 0;

	if (!has_argument)
		flags = arg[1];

	val = 0;

	while ((comma = strchr(flags, ',')) != NULL) {
		if (!set_flag(decl, &val, flags, comma - flags))
			return 0;
		flags = comma + 1;
	}
	if (!set_flag(decl, &val, flags, strlen(flags)))
		return 0;

	*(unsigned *)(((char *)opt) + decl->offset) = val;

	return has_argument ? 1 : 2;
}
开发者ID:VanirLLVM,项目名称:toolchain_isl,代码行数:32,代码来源:isl_arg.c


示例5: set_flag

UnshadedMaterial::UnshadedMaterial() :Material(VisualServer::get_singleton()->fixed_material_create()){

	set_flag(FLAG_UNSHADED,true);
	set_use_alpha(true);
	set_flag(FLAG_COLOR_ARRAY_SRGB,true);

}
开发者ID:3miu,项目名称:godot,代码行数:7,代码来源:material.cpp


示例6: set_flag

//set flags based on comparison between a and b
void CPU::compare(byte a, byte b) {
    char sa = a;
    char sb = b;
    set_flag(N, (sa-sb) & (1 << 7));
    set_flag(Z, sa == sb);
    set_flag(C, a >= b);
}
开发者ID:zoibot,项目名称:knes,代码行数:8,代码来源:cpu.cpp


示例7: ERR_FAIL_INDEX

void Generic6DOFJointBullet::set_param(Vector3::Axis p_axis, PhysicsServer::G6DOFJointAxisParam p_param, real_t p_value) {
	ERR_FAIL_INDEX(p_axis, 3);
	switch (p_param) {
		case PhysicsServer::G6DOF_JOINT_LINEAR_LOWER_LIMIT:
			limits_lower[0][p_axis] = p_value;
			set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, flags[p_axis][p_param]); // Reload bullet parameter
			break;
		case PhysicsServer::G6DOF_JOINT_LINEAR_UPPER_LIMIT:
			limits_upper[0][p_axis] = p_value;
			set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, flags[p_axis][p_param]); // Reload bullet parameter
			break;
		case PhysicsServer::G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS:
			sixDOFConstraint->getTranslationalLimitMotor()->m_limitSoftness = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_LINEAR_RESTITUTION:
			sixDOFConstraint->getTranslationalLimitMotor()->m_restitution = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_LINEAR_DAMPING:
			sixDOFConstraint->getTranslationalLimitMotor()->m_damping = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY:
			sixDOFConstraint->getTranslationalLimitMotor()->m_targetVelocity.m_floats[p_axis] = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT:
			sixDOFConstraint->getTranslationalLimitMotor()->m_maxMotorForce.m_floats[p_axis] = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_LOWER_LIMIT:
			limits_lower[1][p_axis] = p_value;
			set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT, flags[p_axis][p_param]); // Reload bullet parameter
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_UPPER_LIMIT:
			limits_upper[1][p_axis] = p_value;
			set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, flags[p_axis][p_param]); // Reload bullet parameter
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS:
			sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_limitSoftness = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_DAMPING:
			sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_damping = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_RESTITUTION:
			sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_bounce = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_FORCE_LIMIT:
			sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_maxLimitForce = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_ERP:
			sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_stopERP = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY:
			sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_targetVelocity = p_value;
			break;
		case PhysicsServer::G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT:
			sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_maxLimitForce = p_value;
			break;
		default:
			WARN_PRINT("This parameter is not supported");
	}
}
开发者ID:RandomShaper,项目名称:godot,代码行数:59,代码来源:generic_6dof_joint_bullet.cpp


示例8: set_flag

ParticleSystemMaterial::ParticleSystemMaterial() :Material(VisualServer::get_singleton()->fixed_material_create()){

	set_flag(FLAG_DOUBLE_SIDED,true);
	set_flag(FLAG_UNSHADED,true);
	set_depth_draw_mode(DEPTH_DRAW_NEVER);
	VisualServer::get_singleton()->fixed_material_set_flag(material,VS::FIXED_MATERIAL_FLAG_USE_ALPHA,true);
	VisualServer::get_singleton()->fixed_material_set_flag(material,VS::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,true);
}
开发者ID:ErosOlmi,项目名称:godot,代码行数:8,代码来源:material.cpp


示例9: hitachi_lcd_service

void hitachi_lcd_service(void){   
   if(NewCustomSymbolFlags){
      set_flag(CGRAMUsed);
      static uint8_t DataByteNumber = 0, CustomSymbolNumber = 0;
      if(get_flag(CGRAMAddrSet)){
         hitachi_lcd_write_data(*(CustomSymbol[CustomSymbolNumber] + DataByteNumber));
         if(++DataByteNumber > 7){
            bit_clr(NewCustomSymbolFlags, CustomSymbolNumber);
            clr_flag(CGRAMAddrSet);
            DataByteNumber = 0;
            CustomSymbolNumber = 0;
         }
      } else {
         while(!(NewCustomSymbolFlags & (1<<CustomSymbolNumber)))
            CustomSymbolNumber++;
         hitachi_lcd_set_address(CGRAM_ADDR(CustomSymbolNumber*8));
         set_flag(CGRAMAddrSet);
      }
   } else {
      if(get_flag(CGRAMUsed)){
         clr_flag(CGRAMUsed);
         clr_flag(DRAMAddrSet);
         CharNumber = 0;
         hitachi_lcd_set_address(DRAM_ADDR(0x00));
      } else {
         switch(CharNumber){
           case CHAR_IN_ROW:
            if(get_flag(DRAMAddrSet)){
               clr_flag(DRAMAddrSet);
               hitachi_lcd_write_data(pLcdBuffer[CharNumber]);
               CharNumber++;
            } else {
               set_flag(DRAMAddrSet);
               hitachi_lcd_set_address(DRAM_ADDR(0x40));
            }
            break;
            
           case CHAR_ON_LCD:
            if(get_flag(DRAMAddrSet)){
               clr_flag(DRAMAddrSet);
               CharNumber = 0;
               hitachi_lcd_write_data(pLcdBuffer[CharNumber]);
               CharNumber++;
            } else {
               set_flag(DRAMAddrSet);
               hitachi_lcd_set_address(DRAM_ADDR(0x00));
            }
            break;
            
           default:
            hitachi_lcd_write_data(pLcdBuffer[CharNumber]);
            CharNumber++;
            break;
         }
      }
   }
}
开发者ID:TotallyYoursCode,项目名称:garageThermo,代码行数:57,代码来源:hitachi_lcd_lib.c


示例10: check_seekable

void pofilestream::vseek(const pos_type n)
{
	check_seekable();
	if (fseek((FILE *) m_file, SEEK_SET, n) < 0)
		set_flag(FLAG_ERROR);
	else
	{
		m_pos = n;
		if (ferror((FILE *) m_file))
			set_flag(FLAG_ERROR);
	}
}
开发者ID:gvsurenderreddy,项目名称:mame,代码行数:12,代码来源:pstream.cpp


示例11: fread

unsigned pifilestream::vread(void *buf, const unsigned n)
{
	std::size_t r = fread(buf, 1, n, (FILE *) m_file);
	if (r < n)
	{
		if (feof((FILE *) m_file))
			set_flag(FLAG_EOF);
		if (ferror((FILE *) m_file))
			set_flag(FLAG_ERROR);
	}
	m_pos += r;
	return r;
}
开发者ID:gvsurenderreddy,项目名称:mame,代码行数:13,代码来源:pstream.cpp


示例12: l2tpvpn_listen

/* -----------------------------------------------------------------------------
    l2tpvpn_listen - called by vpnd to setup listening socket
----------------------------------------------------------------------------- */
int l2tpvpn_listen(void)
{
        
    if (listen_sockfd <= 0)
        return -1;
    
    if (!opt_noipsec) {
        vpnlog(LOG_INFO, "VPND L2TP plugin:  start racoon...\n");
        /* start racoon */
        if (start_racoon(0 /*pppbundle*/, 0 /*"racoon.l2tp"*/) < 0) {
            vpnlog(LOG_ERR, "VPND L2TP plugin: cannot start racoon...\n");
            return -1;
        }
        /* XXX if we started racoon, we will need to stop it */
        /* racoon should probably provide a control API */
        need_stop_racoon = 1;
    }

    set_flag(listen_sockfd, debug, L2TP_FLAG_DEBUG);
    set_flag(listen_sockfd, 1, L2TP_FLAG_CONTROL);

    /* unknown src and dst addresses */
    any_address.sin_len = sizeof(any_address);
    any_address.sin_family = AF_INET;
    any_address.sin_port = 0;
    any_address.sin_addr.s_addr = INADDR_ANY;
    
    /* bind the socket in the kernel with L2TP port */
    listen_address.sin_len = sizeof(listen_address);
    listen_address.sin_family = AF_INET;
    listen_address.sin_port = L2TP_UDP_PORT;
    listen_address.sin_addr.s_addr = INADDR_ANY;
    l2tp_set_ouraddress(listen_sockfd, (struct sockaddr *)&listen_address);
    our_address = listen_address;

    /* add security policies */
    if (!opt_noipsec) { 
        if (configure_racoon(&our_address, &any_address, 0, IPPROTO_UDP, opt_ipsecsharedsecret, opt_ipsecsharedsecrettype)
            || require_secure_transport((struct sockaddr *)&any_address, (struct sockaddr *)&listen_address, IPPROTO_UDP, "in"))  {
            vpnlog(LOG_ERR, "VPND L2TP plugin: cannot configure secure transport...\n");
            return -1;
        }
        /* set IPSec Key management to prefer most recent key */
        if (set_key_preference(&key_preference, 0))
            vpnlog(LOG_ERR, "VPND L2TP plugin: cannot set IPSec Key management preference (error %d)\n", errno);

        secure_transport = 1;
    }

    return listen_sockfd;
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:54,代码来源:main.c


示例13: check_seekable

void pifilestream::vseek(pos_type n)
{
	check_seekable();
	if (fseek((FILE *) m_file, SEEK_SET, n) < 0)
		set_flag(FLAG_ERROR);
	else
		m_pos = n;
	if (feof((FILE *) m_file))
		set_flag(FLAG_EOF);
	else
		clear_flag(FLAG_EOF);
	if (ferror((FILE *) m_file))
		set_flag(FLAG_ERROR);
}
开发者ID:kkklatu,项目名称:mame,代码行数:14,代码来源:pstream.c


示例14: pfm_to_gsf_flags

void pfm_to_gsf_flags (NV_U_INT32 pfm_flags, NV_U_BYTE *gsf_flags)
{
  *gsf_flags = 0;


  if ((pfm_flags & PFM_MANUALLY_INVAL) || (pfm_flags & PFM_FILTER_INVAL))
    {
      if (pfm_flags & PFM_MANUALLY_INVAL)
        {
          set_flag (gsf_flags, HMPS_IGNORE_MANUALLY_EDITED);
        }
      else
        {
          set_flag (gsf_flags, HMPS_IGNORE_FILTER_EDITED);
        }
    }
  else
    {
      if (pfm_flags & PFM_SELECTED_SOUNDING) set_flag (gsf_flags, HMPS_SELECTED_LEAST);

      if (pfm_flags & PFM_SUSPECT) set_flag (gsf_flags, HMPS_SELECTED_SPARE_1);

      if (pfm_flags & PFM_SELECTED_FEATURE) set_flag (gsf_flags, HMPS_SELECTED_CONTACT);
    }

  if (pfm_flags & PFM_USER_02) set_flag (gsf_flags, HMPS_INFO_NOT_1X_IHO);

  if (pfm_flags & PFM_USER_03) set_flag (gsf_flags, HMPS_IGNORE_NOT_2X_IHO);

  if (pfm_flags & PFM_USER_04) set_flag (gsf_flags, HMPS_IGNORE_FOOTPRINT_TOO_BIG);
}
开发者ID:dmagiccys,项目名称:pfmabe,代码行数:31,代码来源:gsf_flags.cpp


示例15: main

int main(void)
{
	flag_init();
	set_flag(UP);
	_delay_ms(1000);
	while (1)
	{
		set_flag(RIGHT);
		_delay_ms(2000);
		set_flag(LEFT);
		_delay_ms(2000);
	}
	return (0);
}
开发者ID:vlitan,项目名称:Anvil,代码行数:14,代码来源:flag_test.c


示例16: mandatory

void ter_t::load( JsonObject &jo, const std::string &src )
{
    map_data_common_t::load( jo, src );
    mandatory( jo, was_loaded, "name", name_ );
    mandatory( jo, was_loaded, "move_cost", movecost );
    optional( jo, was_loaded, "max_volume", max_volume, legacy_volume_reader, DEFAULT_MAX_VOLUME_IN_SQUARE );
    optional( jo, was_loaded, "trap", trap_id_str );

    load_symbol( jo );

    trap = tr_null;
    transparent = false;
    connect_group = TERCONN_NONE;

    for( auto &flag : jo.get_string_array( "flags" ) ) {
        set_flag( flag );
    }
    // connect_group is initialized to none, then terrain flags are set, then finally
    // connections from JSON are set. This is so that wall flags can set wall connections
    // but can be overridden by explicit connections in JSON.
    if( jo.has_member( "connects_to" ) ) {
        set_connects( jo.get_string( "connects_to" ) );
    }

    optional( jo, was_loaded, "open", open, ter_str_id::NULL_ID() );
    optional( jo, was_loaded, "close", close, ter_str_id::NULL_ID() );
    optional( jo, was_loaded, "transforms_into", transforms_into, ter_str_id::NULL_ID() );
    optional( jo, was_loaded, "roof", roof, ter_str_id::NULL_ID() );

    bash.load( jo, "bash", false );
    deconstruct.load( jo, "deconstruct", false );
}
开发者ID:belazzz,项目名称:Cataclysm-DDA,代码行数:32,代码来源:mapdata.cpp


示例17: set_flag

NucleicAcid::NucleicAcid( const clipper::Coord_orth& cp, const clipper::Coord_orth& co5, const clipper::Coord_orth& cc5, const clipper::Coord_orth& cc4, const clipper::Coord_orth& co4, const clipper::Coord_orth& cc3, const clipper::Coord_orth& co3, const clipper::Coord_orth& cc2, const clipper::Coord_orth& cc1, const clipper::Coord_orth& cn, const clipper::String& type )
{
  clipper::String t = type + "?";
  typ = t.trim()[0];
  clipper::Util::set_null( p_x );
  clipper::Util::set_null( o5x );
  clipper::Util::set_null( c5x );
  clipper::Util::set_null( c4x );
  clipper::Util::set_null( o4x );
  clipper::Util::set_null( c3x );
  clipper::Util::set_null( o3x );
  clipper::Util::set_null( c2x );
  clipper::Util::set_null( c1x );
  clipper::Util::set_null( n_x );
  if ( !cp.is_null()  ) { p_x = cp.x(); p_y = cp.y(); p_z = cp.z(); }
  if ( !co5.is_null() ) { o5x = co5.x(); o5y = co5.y(); o5z = co5.z(); }
  if ( !cc5.is_null() ) { c5x = cc5.x(); c5y = cc5.y(); c5z = cc5.z(); }
  if ( !cc4.is_null() ) { c4x = cc4.x(); c4y = cc4.y(); c4z = cc4.z(); }
  if ( !co4.is_null() ) { o4x = co4.x(); o4y = co4.y(); o4z = co4.z(); }
  if ( !cc3.is_null() ) { c3x = cc3.x(); c3y = cc3.y(); c3z = cc3.z(); }
  if ( !co3.is_null() ) { o3x = co3.x(); o3y = co3.y(); o3z = co3.z(); }
  if ( !cc2.is_null() ) { c2x = cc2.x(); c2y = cc2.y(); c2z = cc2.z(); }
  if ( !cc1.is_null() ) { c1x = cc1.x(); c1y = cc1.y(); c1z = cc1.z(); }
  if ( !cn.is_null()  ) { n_x = cn.x(); n_y = cn.y(); n_z = cn.z(); }
  set_flag();
}
开发者ID:pemsley,项目名称:coot,代码行数:26,代码来源:nucleicacid_db.cpp


示例18: clear_flag

/**
* \brief 向套接口发送原始数据,没有打包的数据,一般发送数据的时候需要加入额外的包头
* \param pBuffer 待发送的原始数据
* \param nSize 待发送的原始数据大小
* \return 实际发送的字节数
*       返回-1,表示发送错误
*       返回0,表示发送超时
*       返回整数,表示实际发送的字节数
*/
int CSocket::sendRawData(const void *pBuffer,const int nSize)
{
	if (isset_flag(INCOMPLETE_WRITE))
	{
		clear_flag(INCOMPLETE_WRITE);
		goto do_select;
	}
	if( nSize > 10000 )
	{
		int iii = 0;
	}
	int retcode = Send(sock,(const char*)pBuffer,nSize,MSG_NOSIGNAL);
	if (retcode == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
	{
do_select:
		retcode = waitForWrite();
		if (1 == retcode)
		{
			mutex.lock();
			retcode = Send(sock,(const char*)pBuffer,nSize,MSG_NOSIGNAL);
			mutex.unlock();
		}
		else
			return retcode; 
	}

	if (retcode > 0 && retcode < nSize)
		set_flag(INCOMPLETE_WRITE);

	return retcode;
}
开发者ID:edolphin-ydf,项目名称:hydzhengtu,代码行数:40,代码来源:Socket.cpp


示例19: Material

FixedMaterial::FixedMaterial() : Material(VS::get_singleton()->fixed_material_create()) {



	param[PARAM_DIFFUSE]=Color(1,1,1);
	param[PARAM_SPECULAR]=Color(0.0,0.0,0.0);
	param[PARAM_EMISSION]=Color(0.0,0.0,0.0);
	param[PARAM_SPECULAR_EXP]=40;
	param[PARAM_GLOW]=0;
	param[PARAM_NORMAL]=1;
	param[PARAM_SHADE_PARAM]=0.5;
	param[PARAM_DETAIL]=1.0;

	set_flag(FLAG_COLOR_ARRAY_SRGB,true);

	fixed_flags[FLAG_USE_ALPHA]=false;
	fixed_flags[FLAG_USE_COLOR_ARRAY]=false;
	fixed_flags[FLAG_USE_POINT_SIZE]=false;
	fixed_flags[FLAG_USE_XY_NORMALMAP]=false;
	fixed_flags[FLAG_DISCARD_ALPHA]=false;


	for(int i=0;i<PARAM_MAX;i++) {

		texture_texcoord[i]=TEXCOORD_UV;
	}

	light_shader=LIGHT_SHADER_LAMBERT;

	point_size=1.0;
}
开发者ID:Ace17,项目名称:godot,代码行数:31,代码来源:material.cpp


示例20: TIMERA0_ISR

__interrupt void TIMERA0_ISR(void)
{
//  ENABLE_ADC;         // give Vref time to settle down need 30 uS (clock cycles) before conversion
	P1OUT ^= GREEN_LED;                       // Clear P1.0 LED off
	ADC10CTL0 |= ENC + ADC10SC;	// Sampling and conversion start
	set_flag(TIMER0_FLAG);
}
开发者ID:tlee619,项目名称:display,代码行数:7,代码来源:main.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ set_flags函数代码示例发布时间:2022-05-30
下一篇:
C++ set_field函数代码示例发布时间: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