您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetInt函数代码示例

51自学网 2021-06-01 21:09:30
  C++
这篇教程C++ GetInt函数代码示例写得很实用,希望能帮到您。

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

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

示例1: GetInt

void cConfigs::ZenFixes(){	Zen.NormalZen					= GetInt(0, 65535,				20,		"ZenSettings",	"ZenDrop",			GreatDevelopCommon);	Zen.ZenInParty					= GetInt(0, 65535,				20,		"ZenSettings",	"ZenPartyDrop",		GreatDevelopCommon);}
开发者ID:BlueEyed,项目名称:GreatDevelop-Julia-Project,代码行数:5,


示例2: return

WORD Cx_CfgRecord::GetUInt16(const wchar_t* pszEntry, WORD nDefault){    return (WORD)GetInt(pszEntry, nDefault);}
开发者ID:killvxk,项目名称:WebbrowserLock,代码行数:4,


示例3: main

int main(int argc, string argv[]){    // greet player    greet();    // ensure proper usage    if (argc != 2)    {        printf("Usage: ./fifteen d/n");        return 1;    }    // ensure valid dimensions    d = atoi(argv[1]);    if (d < MIN || d > MAX)    {        printf("Board must be between %i x %i and %i x %i, inclusive./n",            MIN, MIN, MAX, MAX);        return 2;    }        // initialize the board,     init(d);    // accept moves until game is won    while (true)    {        // clear the screen        clear();        // draw the current state of the board        draw(d);        // saves the current state of the board (for testing)        save();        // check for win        if (won())        {            printf("ftw!/n");            break;        }        // prompt for move        printf("Tile to move: ");        int tile = GetInt();        // move if possible, else report illegality        if (!move(tile))        {            printf("/nIllegal move./n");            usleep(500000);        }        // sleep for animation's sake        usleep(500000);    }    // that's all folks    return 0;}
开发者ID:tksander,项目名称:cs50,代码行数:61,


示例4: if

void HMISong::SetupForHMP(int len){	int track_data;	int i, p;	ReadVarLen = ReadVarLenHMP;	if (MusHeader[8] == 0)	{		track_data = HMP_TRACK_OFFSET_0;	}	else if (memcmp(MusHeader + 8, HMP_NEW_DATE, sizeof(HMP_NEW_DATE)) == 0)	{		track_data = HMP_TRACK_OFFSET_1;	}	else	{ // unknown HMIMIDIP version		return;	}	NumTracks = GetInt(MusHeader + HMP_TRACK_COUNT_OFFSET);	if (NumTracks <= 0)	{		return;	}	// The division is the number of pulses per quarter note (PPQN).	Division = GetInt(MusHeader + HMP_DIVISION_OFFSET);	InitialTempo = 1000000;	Tracks = new TrackInfo[NumTracks + 1];	// Gather information about each track	for (i = 0, p = 0; i < NumTracks; ++i)	{		int start = track_data;		int tracklen;		if (start > len - HMPTRACK_MIDI_DATA_OFFSET)		{ // Track is incomplete.			break;		}		tracklen = GetInt(MusHeader + start + HMPTRACK_LEN_OFFSET);		track_data += tracklen;		// Clamp incomplete tracks to the end of the file.		tracklen = MIN(tracklen, len - start);		if (tracklen <= 0)		{			continue;		}		// Subtract track header size.		tracklen -= HMPTRACK_MIDI_DATA_OFFSET;		if (tracklen <= 0)		{			continue;		}		// Store track information		Tracks[p].TrackBegin = MusHeader + start + HMPTRACK_MIDI_DATA_OFFSET;		Tracks[p].TrackP = 0;		Tracks[p].MaxTrackP = tracklen;		// Retrieve track designations. We can't check them yet, since we have not yet		// connected to the MIDI device.#if 0		// This is completely a guess based on knowledge of how designations work with		// HMI files. Some songs contain nothing but zeroes for this data, so I'd rather		// not go around using it without confirmation.		Printf("Track %d: %d %08x %d:  /034I", i, GetInt(MusHeader + start),			GetInt(MusHeader + start + 4), GetInt(MusHeader + start + 8));		int designations = HMP_DESIGNATIONS_OFFSET +			GetInt(MusHeader + start + HMPTRACK_DESIGNATION_OFFSET) * 4 * NUM_HMP_DESIGNATIONS;		for (int ii = 0; ii < NUM_HMP_DESIGNATIONS; ++ii)		{			Printf(" %04x", GetInt(MusHeader + designations + ii*4));		}		Printf("/n");#endif		Tracks[p].Designation[0] = HMI_DEV_GM;		Tracks[p].Designation[1] = HMI_DEV_GUS;		Tracks[p].Designation[2] = HMI_DEV_OPL2;		Tracks[p].Designation[3] = 0;		p++;	}	// In case there were fewer actual chunks in the file than the	// header specified, update NumTracks with the current value of p.	NumTracks = p;}
开发者ID:BadSanta1980,项目名称:gzdoom,代码行数:95,


示例5: GetInt

ULONG Cx_CfgRecord::GetUInt32(const wchar_t* pszEntry, ULONG nDefault){    return GetInt(pszEntry, nDefault);}
开发者ID:killvxk,项目名称:WebbrowserLock,代码行数:4,


示例6: _T

//.........这里部分代码省略.........		WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,		NULL);	*/	    // Register your unique class name that you wish to use    WNDCLASS wndcls;    memset(&wndcls, 0, sizeof(WNDCLASS));   // start with NULL                                            // defaults    //wndcls.style = CS_DBLCLKS; //双击    //you can specify your own window procedure    wndcls.lpfnWndProc = ::DefWindowProc;     wndcls.hInstance = AfxGetInstanceHandle();    wndcls.hIcon = LoadIcon(IDR_MAINFRAME); // or load a different icon    wndcls.hCursor = LoadStandardCursor( IDC_ARROW );	//backGrush.CreateSolidBrush(RGB(247,247,247));   // Blue brush.	//wndcls.hbrBackground = (HBRUSH)backGrush.m_hObject;    wndcls.lpszMenuName = NULL;    // Specify your own class name for using FindWindow later    wndcls.lpszClassName = _T("VFDTest");    // Register the new class and exit if it fails    if(!AfxRegisterClass(&wndcls))    {       TRACE(_T("Class Registration Failed/n"));       return FALSE;	}	// 主窗口	MainForm* pFrame = new MainForm();	// 取系统参数,确定显示位置和大小	CRect drc; 	// 桌面工作区大小,不算任务栏 	SystemParametersInfo(SPI_GETWORKAREA,0,drc,0);	int dwidth = drc.Width();		// 桌面工作区宽	int dheight = drc.Height();		// 桌面工作区高	// 上次保存的窗口大小	CRect rc;	rc.right = dwidth;		// 第一次进窗口状态,充满桌面,有边框,可改变大小。	rc.bottom = dheight;	//this->GetInt();	rc.left = GetInt( _T("WindowLeft"), rc.left );	rc.top = GetInt( _T("WindowTop"), rc.top );	rc.right = GetInt( _T("WindowRight"), rc.right );	rc.bottom = GetInt( _T("WindowBottom"), rc.bottom );	// 最小尺寸200x200	const int s = 300;		// ?? 应该考虑系统DPI	if( rc.Width() < s )		rc.right = rc.left + s;	if( rc.Height() < s )		rc.bottom = rc.top + s;	// 与桌面相交最少200	int dx = 0, dy = 0, d = 0;	if( rc.right < s )		dx = s - rc.right;	else if( (d = dwidth - rc.left) < s )		dx = d - s;	if( rc.bottom < s )		dy = s - rc.bottom;	else if( (d = dheight - rc.top) < s )		dy = d - s;	// 窗口的左右都超出桌面,窗口移到桌面内	if( rc.left < 0 && rc.right > dwidth )		dx = -rc.left;	if( rc.top < 0 && rc.bottom > dheight )		dy = -rc.top;	// 移动显示区	if( dx || dy )		rc.OffsetRect( dx, dy );	// 创建窗口	// 唯一的一个窗口已初始化,因此显示它并对其进行更新	m_nFullScreen = GetInt( _T("FullScreen"), m_nFullScreen );		// 全屏状态	m_nMaximized = GetInt( _T("ShowMaximized"), m_nMaximized );	// 最大化状态	DWORD style = (m_nFullScreen ? WS_POPUP : WS_OVERLAPPEDWINDOW);	if( m_nFullScreen | m_nMaximized )		style |= WS_MAXIMIZE;	if( !pFrame->CreateEx( NULL, wndcls.lpszClassName, _T("VFDTest"), style, rc, NULL, NULL, NULL ) )	// 无边框,充满屏	{		delete pFrame;		return FALSE;	}	m_pMainWnd = pFrame;	pFrame->ShowWindow(SW_SHOW);	//pFrame->UpdateWindow();	// 仅当具有后缀时才调用 DragAcceptFiles	//  在 SDI 应用程序中,这应在 ProcessShellCommand 之后发生	return TRUE;}
开发者ID:TOAWrong,项目名称:VFDTest,代码行数:101,


示例7: return

template<> BodyType2D Variant::Get<BodyType2D>() const{    return (BodyType2D)GetInt();}
开发者ID:3dicc,项目名称:Urho3D,代码行数:4,


示例8: GetInt

HRESULT SWLPRVenusCameraParameter::InitCamera(VOID){    GetInt("//CamApp"        , "JpegCompressRate"        , &Get().cCamAppParam.iJpegCompressRate        , Get().cCamAppParam.iJpegCompressRate        , 1        , 99        , "视频流Jpeg压缩品质"        , ""        , CUSTOM_LEVEL    );    GetInt("//CamApp"        , "IFrameInterval"        , &Get().cCamAppParam.iIFrameInterval        , Get().cCamAppParam.iIFrameInterval        , 2			//金星要求最小I帧间隔为2        , 25        , "H.264流I帧间隔"        , ""        , CUSTOM_LEVEL    );    if( Get().cGb28181.fEnalbe )    {    	Get().cCamAppParam.iIFrameInterval = 4;        UpdateInt("//CamApp"            , "IFrameInterval"            , Get().cCamAppParam.iIFrameInterval            );    }    GetEnum("//CamApp"        , "Resolution"        , &Get().cCamAppParam.iResolution        , Get().cCamAppParam.iResolution        , "0:1080P;1:720P"        , "H.264图像分辨率"        , ""        , CUSTOM_LEVEL    );    GetInt("//CamApp"        , "TargetBitRate"        , &Get().cCamAppParam.iTargetBitRate        , Get().cCamAppParam.iTargetBitRate        , 512        , 16*1024        , "H.264流输出比特率"        , "单位:Kbps(千比特每秒)"        , CUSTOM_LEVEL    );//第二路H264参数//暂时不支持单独设置I帧间隔/*	GetInt("//CamApp"		, "IFrameIntervalSecond"		, &Get().cCamAppParam.iIFrameIntervalSecond		, Get().cCamAppParam.iIFrameIntervalSecond		, 2		, 25		, "第二路H.264流I帧间隔"		, ""		, CUSTOM_LEVEL	);*/	GetEnum("//CamApp"		, "ResolutionSecond"		, &Get().cCamAppParam.iResolutionSecond		, Get().cCamAppParam.iResolutionSecond		, "0:1080P;1:720P;2:576P;3:480P"		, "第二路H.264图像分辨率"		, ""		, CUSTOM_LEVEL	);	GetInt("//CamApp"		, "TargetBitRateSecond"		, &Get().cCamAppParam.iTargetBitRateSecond		, Get().cCamAppParam.iTargetBitRateSecond		, 512		, 16*1024		, "第二路H.264流输出比特率"		, "单位:Kbps(千比特每秒)"		, CUSTOM_LEVEL	);	//	GetInt("//CamApp"		, "FrameRateSecond"		, &Get().cCamAppParam.iFrameRateSecond		, Get().cCamAppParam.iFrameRateSecond		, 15		, 25		, "第二路H.264流输出帧率"		, "单位:fps(帧每秒)"		, CUSTOM_LEVEL	);//end//.........这里部分代码省略.........
开发者ID:fangbaolei,项目名称:EC700IR,代码行数:101,


示例9: GetEnum

HRESULT SWLPRVenusCameraParameter::InitCharacter(VOID){//第一路H264字符叠加    GetEnum("//Overlay//H264"          , "Enable"          , &Get().cOverlay.fH264Eanble          , Get().cOverlay.fH264Eanble          , "0:不使能;1:使能"          , "H264字符叠加使能"          , ""          , CUSTOM_LEVEL    );    GetInt("//Overlay//H264"          , "X"          , &Get().cOverlay.cH264Info.iTopX          , Get().cOverlay.cH264Info.iTopX          , 0          , 1920          , "X坐标"          , ""          , CUSTOM_LEVEL      );    GetInt("//Overlay//H264"          , "Y"          , &Get().cOverlay.cH264Info.iTopY          , Get().cOverlay.cH264Info.iTopY          , 0          , 1080          , "Y坐标"          , ""          , CUSTOM_LEVEL      );    GetInt("//Overlay//H264"          , "Size"          , &Get().cOverlay.cH264Info.iFontSize          , 32          , 16          , 128          , "字体大小"          , ""          , CUSTOM_LEVEL      );    DWORD dwR = 255, dwG = 0,dwB = 0;    GetInt("//Overlay//H264"          , "R"          , (INT *)&dwR          , dwR          , 0          , 255          , "字体颜色R分量"          , ""          , CUSTOM_LEVEL      );    GetInt("//Overlay//H264"          , "G"          , (INT *)&dwG          , dwG          , 0          , 255          , "字体颜色G分量"          , ""          , CUSTOM_LEVEL      );    GetInt("//Overlay//H264"          , "B"          , (INT *)&dwB          , dwB          , 0          , 255          , "字体颜色B分量"          , ""          , CUSTOM_LEVEL      );    Get().cOverlay.cH264Info.dwColor = (dwB | (dwG << 8) | (dwR << 16));      SW_TRACE_DEBUG("h264 color[0x%08x][0x%02x,0x%02x,0x%02x]", Get().cOverlay.cH264Info.dwColor, dwR, dwG, dwB);    GetEnum("//Overlay//H264"          , "DateTime"          , &Get().cOverlay.cH264Info.fEnableTime          , Get().cOverlay.cH264Info.fEnableTime          , "0:不使能;1:使能"          , "叠加时间"          , ""          , CUSTOM_LEVEL      );     GetString("//Overlay//H264"          , "String"          , Get().cOverlay.cH264Info.szInfo          , Get().cOverlay.cH264Info.szInfo          , sizeof(Get().cOverlay.cH264Info.szInfo)          , ""          , "叠加信息"          , CUSTOM_LEVEL      );    if(!swpa_strcmp(Get().cOverlay.cH264Info.szInfo, "NULL"))    {      swpa_strcpy(Get().cOverlay.cH264Info.szInfo, "");//.........这里部分代码省略.........
开发者ID:fangbaolei,项目名称:EC700IR,代码行数:101,


示例10: GetPrivateProfileString

void cConfigs::LoadConfigsInGS(){								  	 	#ifdef _GS	DWORD *LoreGuard = (DWORD*)GUARD_SAY;	char Lore[25];	GetPrivateProfileString("Connect","GuardSay","Don't waste my time!",Lore,25,GreatDevelopGS);	memset(&LoreGuard[0],0,25);	memcpy(&LoreGuard[0],Lore,strlen(Lore));	#endif	DWORD dword;	BYTE byte;	dword = GetInt(300, 1000, 400,"LevelSettings", "MaxLevel", GreatDevelopCommon);	*(unsigned int*) GS_MAX_LEVEL1 = dword;	*(unsigned int*) GS_MAX_LEVEL2 = dword;	*(unsigned int*) GS_MAX_LEVEL3 = dword;	*(unsigned int*) GS_MAX_LEVEL4 = dword;	*(unsigned int*) GS_MAX_LEVEL5 = dword;	*(unsigned int*) GS_NOEXP_LEVEL = GetInt(401, 1001, 401,"LevelSettings", "MaxXPLevel", GreatDevelopCommon);	*(unsigned int*) GS_MAX_MASTERLEVEL = GetInt(1, 400, 200,"LevelSettings", "MaxMasterLevel", GreatDevelopCommon);	dword = GetInt(0, 360, 120,"ItemDropRates", "LootingTime", GreatDevelopItems);	*(unsigned int*) GS_ITEM_TIME1 =	1000 * dword;	*(unsigned int*) GS_ITEM_TIME2 =	1000 * dword;	*(unsigned int*) GS_TRANSFORMATIONRING1 = GetInt(0, 600, 2,"TransformationRings","TransformRing1",GreatDevelopItems);	*(unsigned int*) GS_TRANSFORMATIONRING2 = GetInt(0, 600, 7,"TransformationRings","TransformRing2",GreatDevelopItems);	*(unsigned int*) GS_TRANSFORMATIONRING3 = GetInt(0, 600, 14,"TransformationRings","TransformRing3",GreatDevelopItems);	*(unsigned int*) GS_TRANSFORMATIONRING4 = GetInt(0, 600, 8,"TransformationRings","TransformRing4",GreatDevelopItems);	*(unsigned int*) GS_TRANSFORMATIONRING5 = GetInt(0, 600, 9,"TransformationRings","TransformRing5",GreatDevelopItems);	*(unsigned int*) GS_TRANSFORMATIONRING6 = GetInt(0, 600, 41,"TransformationRings","TransformRing6",GreatDevelopItems);	*(unsigned char*) GS_SUMMONORB1 = GetChar(0, 600, 26,"SummonOrbs","OrbSummon1",GreatDevelopItems);	*(unsigned char*) GS_SUMMONORB2 = GetChar(0, 600, 32,"SummonOrbs","OrbSummon2",GreatDevelopItems);	*(unsigned char*) GS_SUMMONORB3 = GetChar(0, 600, 21,"SummonOrbs","OrbSummon3",GreatDevelopItems);	*(unsigned char*) GS_SUMMONORB4 = GetChar(0, 600, 20,"SummonOrbs","OrbSummon4",GreatDevelopItems);	*(unsigned char*) GS_SUMMONORB5 = GetChar(0, 600, 10,"SummonOrbs","OrbSummon5",GreatDevelopItems);	*(unsigned char*) GS_SUMMONORB6 = GetChar(0, 600, 150,"SummonOrbs","OrbSummon6",GreatDevelopItems);	*(unsigned char*) GS_SUMMONORB7 =  GetChar(0, 600, 151,"SummonOrbs","OrbSummon7",GreatDevelopItems);		*(unsigned int*) GS_BLESS_PRICE = GetInt(0, 2000000000, 6000000,"JewelPrices","JewelOfBlessPrice",GreatDevelopItems); 	*(unsigned int*) GS_SOUL_PRICE = GetInt(0, 2000000000, 9000000,"JewelPrices","JewelOfSoulPrice",GreatDevelopItems);	*(unsigned int*) GS_CHAOS_PRICE = GetInt(0, 2000000000, 810000,"JewelPrices","JewelOfChaosPrice",GreatDevelopItems);	*(unsigned int*) GS_LIFE_PRICE =  GetInt(0, 2000000000, 45000000,"JewelPrices","JewelOfLifePrice",GreatDevelopItems);	*(unsigned int*) GS_CREATION_PRICE = GetInt(0, 2000000000, 36000000,"JewelPrices","JewelOfCreationPrice",GreatDevelopItems);	*(unsigned int*) GS_GUARDIAN_PRICE = GetInt(0, 2000000000, 60000000,"JewelPrices","JewelOfGuardianPrice",GreatDevelopItems);	*(unsigned int*) GS_FRUITS_PRICE = GetInt(0, 2000000000, 33000000,"JewelPrices","FruitPrice",GreatDevelopItems);	*(unsigned int*) GS_MONARCH_PRICE = GetInt(0, 2000000000, 750000,"JewelPrices","CrestOfMonarchPrice",GreatDevelopItems);	*(unsigned int*) GS_FEATHER_PRICE = GetInt(0, 2000000000, 180000,"JewelPrices","LochsFeatherPrice",GreatDevelopItems);	*(unsigned int*) GS_BLESSPOT_PRICE = GetInt(0, 2000000000, 900000,"JewelPrices","PotionOfBlessPrice",GreatDevelopItems);	*(unsigned int*) GS_SOULPOT_PRICE = GetInt(0, 2000000000, 450000,"JewelPrices","PotionOfSoulPrice",GreatDevelopItems);#ifdef _GS	*(unsigned int*) GS_KUNDUN_ANC_PERCT = GetInt(0,10000,25,"Kundun","KundunDropAncRate",GreatDevelopItems);	*(unsigned char*) GS_KUNDUN_ITEM_NUMB = GetChar(0,20,3,"Kundun","KundunDropItemCount",GreatDevelopItems);	*(unsigned char*) GS_CCPLAYER = GetChar(0,20,2,"ChaosCastle","ChaosCastleMinPlayers",GreatDevelopEvents); 	*(unsigned char*) GS_ITPLAYER = GetChar(0,20,4,"IllusionTemple","ItMinPlayers",GreatDevelopEvents); 	/*	*(unsigned char*) GS_CCREWARD1 = GetChar(0,15,14,"ChaosCastle","ChaosCastleRewardType1GroupID",GreatDevelopEvents) * 512 + GetChar(0,255,16,"ChaosCastle","ChaosCastleRewardType1IndexID",GreatDevelopEvents);	*(unsigned char*) GS_CCREWARD2 = GetChar(0,15,14,"ChaosCastle","ChaosCastleRewardType2GroupID",GreatDevelopEvents) * 512 + GetChar(0,255,13,"ChaosCastle","ChaosCastleRewardType2IndexID",GreatDevelopEvents);	*(unsigned char*) GS_CCREWARD3 = GetChar(0,15,14,"ChaosCastle","ChaosCastleRewardType3GroupID",GreatDevelopEvents) * 512 + GetChar(0,255,22,"ChaosCastle","ChaosCastleRewardType3IndexID",GreatDevelopEvents);	*(unsigned char*) GS_CCREWARD4 = GetChar(0,15,14,"ChaosCastle","ChaosCastleRewardType4GroupID",GreatDevelopEvents) * 512 + GetChar(0,255,14,"ChaosCastle","ChaosCastleRewardType4IndexID",GreatDevelopEvents); 		*(unsigned char*) GS_IT_GROUP_ID = GetChar(0,15,15,"IllusionTemple","ItDropGroup",GreatDevelopEvents);	*(unsigned char*) GS_IT_DROP_ID = GetChar(0,255,12,"IllusionTemple","ItDropID",GreatDevelopEvents); 	*(unsigned char*) GS_IT_ITEM_LVL = GetChar(0,15,0,"IllusionTemple","ItDropLevel",GreatDevelopEvents);	*(unsigned char*) GS_IT_ITEM_SKL =  GetChar(0,1,0,"IllusionTemple","ItDropWithSkill",GreatDevelopEvents);	*(unsigned char*) GS_IT_ITEM_LCK = GetChar(0,1,0,"IllusionTemple","ItDropWithLuck",GreatDevelopEvents);	*(unsigned char*) GS_IT_ITEM_LIF = GetChar(0,7,0,"IllusionTemple","ItDropLifeAdd",GreatDevelopEvents);	*(unsigned char*) GS_IT_ITEM_EXC = GetChar(0,63,0,"IllusionTemple","ItDropExcOpt",GreatDevelopEvents);	*(unsigned char*) GS_IT_ITEM_ANC = GetChar(0,255,0,"IllusionTemple","ItDropAncOpt",GreatDevelopEvents); 	*(unsigned char *) GS_BC_DROP_GROUP = GetChar(0,15,15,"BloodCastle","BcDropGroup",GreatDevelopEvents);	*(unsigned char *) GS_BC_DROP_ID = GetChar(0,255,12,"BloodCastle","BcDropID",GreatDevelopEvents);	*(unsigned char *) GS_BC_ITEM_LVL = GetChar(0,15,0,"BloodCastle","BcDropLevel",GreatDevelopEvents);	*(unsigned char *) GS_BC_ITEM_SKL = GetChar(0,1,0,"BloodCastle","BcDropWithSkill",GreatDevelopEvents);	*(unsigned char *) GS_BC_ITEM_LCK = GetChar(0,1,0,"BloodCastle","BcDropWithLuck",GreatDevelopEvents);	*(unsigned char *) GS_BC_ITEM_LIF = GetChar(0,7,0,"BloodCastle","BcDropLifeAdd",GreatDevelopEvents);	*(unsigned char *) GS_BC_ITEM_EXC = GetChar(0,63,0,"BloodCastle","BcDropExcOpt",GreatDevelopEvents);	*(unsigned char *) GS_BC_ITEM_ANC = GetChar(0,255,0,"BloodCastle","BcDropAncOpt",GreatDevelopEvents); 	*(unsigned char *) GS_WW_GROUP_ID = GetChar(0,15,13,"WhiteWizard","WizardDropGroup",GreatDevelopEvents);	*(unsigned char *) GS_WW_DROP_ID = GetChar(0,255,20,"WhiteWizard","WizardDropItemID",GreatDevelopEvents);	*(unsigned char *) GS_WW_ITEM_LVL = GetChar(0,15,0,"WhiteWizard","WizardDropLevel",GreatDevelopEvents);	*(unsigned char *) GS_WW_ITEM_SKL = GetChar(0,1,0,"WhiteWizard","WizardDropWithSkill",GreatDevelopEvents);	*(unsigned char *) GS_WW_ITEM_LCK = GetChar(0,1,0,"WhiteWizard","WizardDropWithLuck",GreatDevelopEvents);	*(unsigned char *) GS_WW_ITEM_LIF = GetChar(0,7,0,"WhiteWizard","WizardDropLifeAdd",GreatDevelopEvents);	*(unsigned char *) GS_WW_ITEM_EXC = GetChar(0,63,0,"WhiteWizard","WizardDropExcOpt",GreatDevelopEvents);	*(unsigned char *) GS_WW_ITEM_ANC = GetChar(0,255,0,"WhiteWizard","WizardDropAncOpt",GreatDevelopEvents);	*/#endif	*(unsigned char*) GS_GUILDALLIANCE = GetChar(0,50,20,"Guild","GuildAllianceMinPlayers",GreatDevelopCommon);	*(unsigned char*) GS_PKBugLimitFix1 = GetChar(0, 1000, 20,"PKOptions", "PKKillLimit", GreatDevelopCommon);    *(unsigned char*) GS_PKBugLimitFix2 = GetChar(0, 1000, 20,"PKOptions", "PKKillLimit", GreatDevelopCommon);    *(unsigned char*) GS_PKBugLimitFix3 = GetChar(0, 1000, 20,"PKOptions", "PKKillLimit", GreatDevelopCommon);//.........这里部分代码省略.........
开发者ID:BlueEyed,项目名称:GreatDevelop-Julia-Project,代码行数:101,


示例11: QueryByNo

int QueryByNo(int no){	SendInt(fifo_ctstat, no);	int shmid = GetInt(fifo_shstat);	printf ( "%d memory = %d /n", no, shmid );	return shmid;}
开发者ID:roynwang,项目名称:RStock,代码行数:6,


示例12: GetInt

int CScValue::DbgGetValInt() {	return GetInt();}
开发者ID:somaen,项目名称:Wintermute-git,代码行数:3,


示例13: Pop

/*!  /param Func*/xbShort xbExpn::ProcessFunction( char * Func ){/* 1 - pop function from stack   2 - verify function name and get no of parms needed    3 - verify no of parms >= remainder of stack   4 - pop parms off stack   5 - execute function   6 - push result back on stack*/  char   *buf = 0;  xbExpNode *p1, *p2, *p3, *WorkNode, *FuncNode;  xbShort  ParmsNeeded,len;  char   ptype = 0;  /* process type s=string, l=logical, d=double */  xbDouble DoubResult = 0;  xbLong   IntResult = 0;  FuncNode = (xbExpNode *) Pop();  ParmsNeeded = GetFuncInfo( Func, 1 );  if( ParmsNeeded == -1 ) {    return XB_INVALID_FUNCTION;  }  else {    ParmsNeeded = 0;    if( FuncNode->Sibling1 ) ParmsNeeded++;    if( FuncNode->Sibling2 ) ParmsNeeded++;    if( FuncNode->Sibling3 ) ParmsNeeded++;  }  if( ParmsNeeded > GetStackDepth())    return XB_INSUFFICIENT_PARMS;  p1 = p2 = p3 = NULL;  if( ParmsNeeded > 2 ) p3 = (xbExpNode *) Pop();   if( ParmsNeeded > 1 ) p2 = (xbExpNode *) Pop();   if( ParmsNeeded > 0 ) p1 = (xbExpNode *) Pop();   memset( WorkBuf, 0x00, WorkBufMaxLen+1);  if( strncmp( Func, "ABS", 3 ) == 0 ) {      ptype = 'd';    DoubResult = ABS( GetDoub( p1 ));  }  else if( strncmp( Func, "ASC", 3 ) == 0 ) {      ptype = 'd';    DoubResult = ASC( p1->StringResult );  }  else if( strncmp( Func, "AT", 2 ) == 0 ) {      ptype = 'd';    DoubResult = AT( p1->StringResult, p2->StringResult );  }  else if( strncmp( Func, "CDOW", 4 ) == 0 ) {      ptype = 's';    buf = CDOW( p1->StringResult );  }  else if( strncmp( Func, "CHR", 3 ) == 0 ) {      ptype = 's';    buf = CHR( GetInt( p1 ));  }  else if( strncmp( Func, "CMONTH", 6 ) == 0 ) {      ptype = 's';    buf = CMONTH( p1->StringResult );  }  else if( strncmp( Func, "CTOD", 4 ) == 0 ) {      ptype = 's';    buf = CTOD( p1->StringResult );  }  else if( strncmp( Func, "DATE", 4 ) == 0 ) {      ptype = 's';    buf = DATE();  }  else if( strncmp( Func, "DAY", 3 ) == 0 ) {      ptype = 'd';    DoubResult = DAY( p1->StringResult );  }  else if( strncmp( Func, "DESCEND", 7 ) == 0 && p1->ExpressionType == 'C' ) {      ptype = 's';    buf = DESCEND( p1->StringResult.c_str() );  }  else if( strncmp( Func, "DESCEND", 7 ) == 0 && p1->ExpressionType == 'N' ) {      ptype = 'd';    DoubResult = DESCEND( GetDoub( p1 ));  }  else if( strncmp( Func, "DESCEND", 7 ) == 0 && p1->ExpressionType == 'D' ) {      xbDate d( p1->StringResult );    ptype = 'd';    DoubResult = DESCEND( d );  }  else if( strncmp( Func, "DOW", 3 ) == 0 ) {    ptype = 'd';    DoubResult = DOW( p1->StringResult );  }  else if( strncmp( Func, "DTOC", 4 ) == 0 ) {      ptype = 's';    buf = DTOC( p1->StringResult );  }//.........这里部分代码省略.........
开发者ID:utech,项目名称:UtechLib,代码行数:101,


示例14: return

DWORD CRegistry::GetDword(LPCTSTR pszSection, LPCTSTR pszName, DWORD dwDefault){	return (int)GetInt( pszSection, pszName, (int)dwDefault );}
开发者ID:pics860,项目名称:callcenter,代码行数:4,


示例15: GetInt

void CDarkMarshalBuffer::GetMultiParm(sMultiParm& parm){	parm._type = (eMultiParmType)(int)GetByte();	parm._int = GetInt();	// Obviously, it doesn't matter which union member we retrieve here}
开发者ID:adrikim,项目名称:thiefmp,代码行数:5,


示例16: AfxMessageBox

BOOL CBCGPOrganizerApp::InitInstance(){	// Initialize OLE libraries	if (!AfxOleInit())	{		AfxMessageBox(IDP_OLE_INIT_FAILED);		return FALSE;	}	AfxEnableControlContainer();	// Standard initialization	// If you are not using these features and wish to reduce the size	//  of your final executable, you should remove from the following	//  the specific initialization routines you do not need.#if _MSC_VER < 1400#ifdef _AFXDLL	Enable3dControls();			// Call this when using MFC in a shared DLL#else	Enable3dControlsStatic();	// Call this when linking to MFC statically#endif#endif	// Change the registry key under which our settings are stored.	// TODO: You should modify this string to be something appropriate	// such as the name of your company or organization.	SetRegistryKey(_T("BCGSoft//BCGControlBarPro//Examples"));	LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)	SetRegistryBase (_T("Settings2"));	m_OptionsPlanner.Load ();	m_OptionsGantt.Load ();	// Initialize all Managers for usage. They are automatically constructed	// if not yet present	InitContextMenuManager();	InitKeyboardManager();	InitTooltipManager();	m_bShowFloaty = GetInt (_T("ShowFloaty"), TRUE);	m_nAppLook = GetInt (_T("ApplicationLook"), 1);	m_bShowToolTips = GetInt (_T("ShowToolTips"), TRUE);	m_bShowKeyTips = GetInt (_T("ShowKeyTips"), TRUE);	m_bShowToolTipDescr = GetInt (_T("ShowToolTipDescription"), TRUE);	CBCGPToolTipParams params;	params.m_bVislManagerTheme = TRUE;	globalData.m_nMaxToolTipWidth = 150;	theApp.GetTooltipManager ()->SetTooltipParams (		0xFFFF,		RUNTIME_CLASS (CRibbonTooltipCtrl),		&params);		if (m_OptionsPlanner.m_ShowToolTip == 2)	{		GetTooltipManager ()->SetTooltipParams (			BCGP_TOOLTIP_TYPE_PLANNER,			RUNTIME_CLASS (CPlannerTooltipCtrl),			&params);	}	if (m_OptionsGantt.m_ShowToolTip == 2)	{ 		GetTooltipManager ()->SetTooltipParams ( 			BCGP_TOOLTIP_TYPE_GANTT, 			RUNTIME_CLASS (CGanttTooltipCtrl), 			&params);	}	// Register the application's document templates.  Document templates	//  serve as the connection between documents, frame windows and views.	CSingleDocTemplate* pDocTemplate;	pDocTemplate = new CSingleDocTemplate(		IDR_MAINFRAME,		RUNTIME_CLASS(CBCGPOrganizerDoc),		RUNTIME_CLASS(CMainFrame),       // main SDI frame window		RUNTIME_CLASS(CBCGPOrganizerView));	AddDocTemplate(pDocTemplate);	// Parse command line for standard shell commands, DDE, file open	CCommandLineInfo cmdInfo;	ParseCommandLine(cmdInfo);	// Dispatch commands specified on the command line	if (!ProcessShellCommand(cmdInfo))		return FALSE;	// The one and only window has been initialized, so show and update it.	m_pMainWnd->ShowWindow(SW_SHOW);/*	CRect rect;	m_pMainWnd->GetWindowRect (rect);	m_pMainWnd->SetWindowPos (NULL, -1, -1, rect.Width (), rect.Height (), SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);*/	m_pMainWnd->UpdateWindow();//.........这里部分代码省略.........
开发者ID:zxlooong,项目名称:bcgexp,代码行数:101,


示例17: GetShort

void HMISong::SetupForHMI(int len){	int i, p;	ReadVarLen = ReadVarLenHMI;	NumTracks = GetShort(MusHeader + HMI_TRACK_COUNT_OFFSET);	if (NumTracks <= 0)	{		return;	}	// The division is the number of pulses per quarter note (PPQN).	// HMI files have two values here, a full value and a quarter value. Some games, 	// notably Quarantines, have identical values for some reason, so it's safer to	// use the quarter value and multiply it by four than to trust the full value.	Division = GetShort(MusHeader + HMI_DIVISION_OFFSET) << 2;	InitialTempo = 4000000;	Tracks = new TrackInfo[NumTracks + 1];	int track_dir = GetInt(MusHeader + HMI_TRACK_DIR_PTR_OFFSET);	// Gather information about each track	for (i = 0, p = 0; i < NumTracks; ++i)	{		int start = GetInt(MusHeader + track_dir + i*4);		int tracklen, datastart;		if (start > len - HMITRACK_DESIGNATION_OFFSET - 4)		{ // Track is incomplete.			continue;		}		// BTW, HMI does not actually check the track header.		if (memcmp(MusHeader + start, TRACK_MAGIC, 13) != 0)		{			continue;		}		// The track ends where the next one begins. If this is the		// last track, then it ends at the end of the file.		if (i == NumTracks - 1)		{			tracklen = len - start;		}		else		{			tracklen = GetInt(MusHeader + track_dir + i*4 + 4) - start;		}		// Clamp incomplete tracks to the end of the file.		tracklen = MIN(tracklen, len - start);		if (tracklen <= 0)		{			continue;		}		// Offset to actual MIDI events.		datastart = GetInt(MusHeader + start + HMITRACK_DATA_PTR_OFFSET);		tracklen -= datastart;		if (tracklen <= 0)		{			continue;		}		// Store track information		Tracks[p].TrackBegin = MusHeader + start + datastart;		Tracks[p].TrackP = 0;		Tracks[p].MaxTrackP = tracklen;		// Retrieve track designations. We can't check them yet, since we have not yet		// connected to the MIDI device.		for (int ii = 0; ii < NUM_HMI_DESIGNATIONS; ++ii)		{			Tracks[p].Designation[ii] = GetShort(MusHeader + start + HMITRACK_DESIGNATION_OFFSET + ii*2);		}		p++;	}	// In case there were fewer actual chunks in the file than the	// header specified, update NumTracks with the current value of p.	NumTracks = p;}
开发者ID:BadSanta1980,项目名称:gzdoom,代码行数:83,


示例18: VerbosePrintf

/******************************************************************************** Name:			Read3DS ()*******************************************************************************/int M3DMAGIC::Read3DS (int iNrOfBytes, byte* bp3DSData){	int iCurrentByte = 0;	// Pointer to current byte in chunk	int iChunkID;			// Chunk id	long lChunkLength;		// Chunk length	// Print status	VerbosePrintf ("Begin reading M3DMAGIC chunk");	// Check for zero length	if (iNrOfBytes <= CHUNKHEADER_SIZE)	{		// Set error file contains no data		ErrorPrintf ("File contains no data");		// Return error		return (-1);	}	// Get chunks from M3DMAGIC chunk	while (iCurrentByte < iNrOfBytes)	{		// Get chunk id		iChunkID = Get3DSChunkID (bp3DSData + iCurrentByte);		iCurrentByte += CHUNKID_SIZE;				// Get chunk length		lChunkLength = GetInt (bp3DSData + iCurrentByte);		iCurrentByte += CHUNKLENGTH_SIZE;				// Check if length is correct		if (lChunkLength > (iNrOfBytes - iCurrentByte + CHUNKHEADER_SIZE))		{			// Set error chunk size invalid			ErrorPrintf ("Chunk size invalid");			// Return error			return (-1);		}				// Check chunk id		switch (iChunkID)		{			case M3D_VERSION_CHUNK:				// Print status				VerbosePrintf ("M3D_VERSION chunk found");				// Read M3D_VERSION chunk				if (M3DMAGIC::vVersion.Read3DS (lChunkLength - CHUNKHEADER_SIZE,					bp3DSData + iCurrentByte) != 0)				{					// Return error					return (-1);				}								break;			case MDATA_CHUNK:				// Print status				VerbosePrintf ("MDATA chunk found");				// Read MDATA chunk				if (M3DMAGIC::dData.Read3DS (lChunkLength - CHUNKHEADER_SIZE, bp3DSData + iCurrentByte) != 0) {					// Return error					return (-1);				}				break;			default:				// Print status				VerbosePrintf ("Unknown chunk found in M3DMAGIC: %x", iChunkID);				break;		}				// Set pointer		iCurrentByte += (lChunkLength - CHUNKHEADER_SIZE);	}	// Print status	VerbosePrintf ("End reading M3DMAGIC chunk");	// Return no error	return (0);}
开发者ID:robgietema,项目名称:subzero_editor,代码行数:84,


示例19: GetCol

NFINT64 NFCRecord::GetInt(const int nRow, const std::string& strColTag) const{    int nCol = GetCol(strColTag);    return GetInt(nRow, nCol);}
开发者ID:tcomy,项目名称:NoahGameFrame,代码行数:5,


示例20: GetInt

template <> int Variant::Get<int>() const{    return GetInt();}
开发者ID:AliAkbarMontazeri,项目名称:AtomicGameEngine,代码行数:4,


示例21: assert

 // This makes sorting a lot easier bool operator<(const Clue & other) const {     assert(GetInt() != 0 && other.GetInt() != 0);     return GetInt() < other.GetInt(); }
开发者ID:oeuftete,项目名称:wx-xword,代码行数:6,


示例22: main

int main(int argc, string argv[]) {    // ensure proper usage    if (argc != 2) {        printf("Usage: fifteen d/n");        return 1;    }    // ensure valid dimensions    d = atoi(argv[1]);    if (d < DIM_MIN || d > DIM_MAX) {        printf("Board must be between %i x %i and %i x %i, inclusive./n",               DIM_MIN, DIM_MIN, DIM_MAX, DIM_MAX);        return 2;    }    // open log    FILE *file = fopen("log.txt", "w");    if (file == NULL) {        return 3;    }    // greet user with instructions    greet();    // initialize the board    init();    // accept moves until game is won    while (true) {        // clear the screen        clear();        // draw the current state of the board        draw();        // log the current state of the board (for testing)        for (int i = 0; i < d; i++) {            for (int j = 0; j < d; j++) {                fprintf(file, "%i", board[i][j]);                if (j < d - 1) {                    fprintf(file, "|");                }            }            fprintf(file, "/n");        }        fflush(file);        // check for win        if (won()) {            printf("ftw!/n");            break;        }        // prompt for move        printf("Tile to move: ");        int tile = GetInt();        // quit if user inputs 0 (for testing)        if (tile == 0) {            break;        }        // log move (for testing)        fprintf(file, "%i/n", tile);        fflush(file);        // move if possible, else report illegality        if (!move(tile)) {            printf("/nIllegal move./n");            usleep(500000);        }        // sleep thread for animation's sake        usleep(500000);    }    // close log    fclose(file);    // success    return 0;}
开发者ID:Krak-n,项目名称:learning,代码行数:82,



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


C++ GetInt32Value函数代码示例
C++ GetInstanceId函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。