本文整理汇总了C++中GetInt函数的典型用法代码示例。如果您正苦于以下问题:C++ GetInt函数的具体用法?C++ GetInt怎么用?C++ GetInt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetInt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetInt
void cConfigs::ZenFixes()
{
Zen.NormalZen = GetInt(0, 65535, 20, "ZenSettings", "ZenDrop", GreatDevelopCommon);
Zen.ZenInParty = GetInt(0, 65535, 20, "ZenSettings", "ZenPartyDrop", GreatDevelopCommon);
}
示例2: return
WORD Cx_CfgRecord::GetUInt16(const wchar_t* pszEntry, WORD nDefault)
{
return (WORD)GetInt(pszEntry, nDefault);
}
示例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;
}
示例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;
}
示例5: GetInt
ULONG Cx_CfgRecord::GetUInt32(const wchar_t* pszEntry, ULONG nDefault)
{
return GetInt(pszEntry, nDefault);
}
示例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;
}
示例7: return
template<> BodyType2D Variant::Get<BodyType2D>() const
{
return (BodyType2D)GetInt();
}
示例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
//.........这里部分代码省略.........
示例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, "");
//.........这里部分代码省略.........
示例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);
//.........这里部分代码省略.........
示例11: QueryByNo
int QueryByNo(int no){
SendInt(fifo_ctstat, no);
int shmid = GetInt(fifo_shstat);
printf ( "%d memory = %d \n", no, shmid );
return shmid;
}
示例12: GetInt
int CScValue::DbgGetValInt() {
return GetInt();
}
示例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 );
}
//.........这里部分代码省略.........
示例14: return
DWORD CRegistry::GetDword(LPCTSTR pszSection, LPCTSTR pszName, DWORD dwDefault)
{
return (int)GetInt( pszSection, pszName, (int)dwDefault );
}
示例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
}