本文整理汇总了C++中GetMine函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMine函数的具体用法?C++ GetMine怎么用?C++ GetMine使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetMine函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: EnableControls
void CReactorTool::Refresh ()
{
if (!m_bInited)
return;
if (!GetMine ())
return;
EnableControls (file_type != RDL_FILE);
m_pTrigger = GetMine ()->CCTriggers (m_nTrigger);
m_nCountDown = m_mine->ReactorTime ();
m_nSecretReturn = m_mine->SecretCubeNum ();
InitLBTargets ();
OnSetTarget ();
UpdateData (FALSE);
}
开发者ID:paud,项目名称:d2x-xl,代码行数:14,代码来源:reactordlg.cpp
示例2: OnSide
void CCubeTool::OnSide (int nSide)
{
if (!GetMine ())
return;
m_mine->Current ()->side = m_nSide = nSide;
theApp.MineView ()->Refresh ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:7,代码来源:cubedlg.cpp
示例3: OnDeleteWallAll
void CWallTool::OnDeleteWallAll ()
{
if (!GetMine ())
return;
bool bUndo = theApp.SetModified (TRUE);
theApp.LockUndo ();
theApp.MineView ()->DelayRefresh (true);
CDSegment *seg = m_mine->Segments ();
CDSide *side;
bool bAll = (m_mine->MarkedSegmentCount (true) == 0);
int i, j, nDeleted = 0;
for (i = m_mine->SegCount (); i; i--, seg++) {
side = seg->sides;
for (j = 0; j < MAX_SIDES_PER_SEGMENT; j++, side++) {
if (side->nWall >= MAX_WALLS)
continue;
if (bAll || m_mine->SideIsMarked (i, j)) {
m_mine->DeleteWall (side->nWall);
nDeleted++;
}
}
}
theApp.MineView ()->DelayRefresh (false);
if (nDeleted) {
theApp.UnlockUndo ();
theApp.MineView ()->Refresh ();
Refresh ();
}
else
theApp.ResetModified (bUndo);
}
开发者ID:paud,项目名称:d2x-xl,代码行数:31,代码来源:walldlg.cpp
示例4: OnPoint
void CCubeTool::OnPoint (int nPoint)
{
if (!GetMine ())
return;
m_mine->Current ()->point = m_nPoint = nPoint;
theApp.MineView ()->Refresh ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:7,代码来源:cubedlg.cpp
示例5: OnAddCube
void CCubeTool::OnAddCube ()
{
if (!GetMine ())
return;
m_mine->AddSegment ();
theApp.MineView ()->Refresh ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:7,代码来源:cubedlg.cpp
示例6: OnDeleteCube
void CCubeTool::OnDeleteCube ()
{
if (!GetMine ())
return;
m_mine->DeleteSegment (m_mine->Current ()->segment);
theApp.MineView ()->Refresh ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:7,代码来源:cubedlg.cpp
示例7: OnSetCube
void CCubeTool::OnSetCube ()
{
if (!GetMine ())
return;
m_mine->Current ()->segment = CBCubeNo ()->GetCurSel ();
theApp.MineView ()->Refresh ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:7,代码来源:cubedlg.cpp
示例8: OnSaveTexture
void CTextureTool::OnSaveTexture ()
{
if (!GetMine ())
return;
HINSTANCE hInst = AfxGetApp()->m_hInstance;
char t1Name [20],
t2Name [20];
CDSide *side = m_mine->CurrSide ();
CComboBox *pcb;
save_texture1 = side->nBaseTex & 0x3fff;
save_texture2 = side->nOvlTex & 0x3fff;
int i;
for (i = 0; i < 4; i++)
save_uvls [i].l = side->uvls [i].l;
//CBTexture1 ()->SelectString (-1, texture_name1);
//CBTexture2 ()->SelectString (-1, texture_name2);
pcb = CBTexture1 ();
LoadString (hInst, texture_resource + pcb->GetItemData (pcb->GetCurSel ()), t1Name, sizeof (t1Name));
pcb = CBTexture2 ();
if (i = pcb->GetItemData (pcb->GetCurSel ()))
LoadString (hInst, texture_resource + i, t2Name, sizeof (t2Name));
else
strcpy (t2Name, "(none)");
sprintf(m_szTextureBuf ,"%s,%s", t1Name, t2Name);
UpdateData (FALSE);
//SaveTextureStatic->SetText(message);
}
开发者ID:paud,项目名称:d2x-xl,代码行数:30,代码来源:texturedlg.cpp
示例9: DoDataExchange
void CCubeTool::DoDataExchange (CDataExchange *pDX)
{
if (!GetMine ())
return;
DDX_CBIndex (pDX, IDC_CUBE_CUBENO, m_nCube);
//DDX_CBIndex (pDX, IDC_CUBE_TYPE, m_nType);
SelectItemData (CBType (), m_nType);
DDX_Double (pDX, IDC_CUBE_LIGHT, m_nLight);
DDX_Radio (pDX, IDC_CUBE_SIDE1, m_nSide);
DDX_Radio (pDX, IDC_CUBE_POINT1, m_nPoint);
for (int i = 0; i < 3; i++) {
DDX_Double (pDX, IDC_CUBE_POINTX + i, m_nCoord [i]);
if (m_nCoord [i] < -0x7fff)
m_nCoord [i] = -0x7fff;
else if (m_nCoord [i] > 0x7fff)
m_nCoord [i] = 0x7fff;
// DDV_MinMaxInt (pDX, (long) m_nCoord [i], -0x7fff, 0x7fff);
}
DDX_Check (pDX, IDC_CUBE_ENDOFEXIT, m_bEndOfExit);
DDX_Check (pDX, IDC_CUBE_SETDEFTEXTURE, m_bSetDefTexture);
++m_nOwner;
DDX_CBIndex (pDX, IDC_CUBE_OWNER, m_nOwner);
m_nOwner--;
DDX_Text (pDX, IDC_CUBE_GROUP, m_nGroup);
if (m_nGroup < -1)
m_nGroup = -1;
else if (m_nGroup > 127)
m_nGroup = 127;
//DDV_MinMaxInt (pDX, m_nGroup, -1, 127);
}
开发者ID:paud,项目名称:d2x-xl,代码行数:31,代码来源:cubedlg.cpp
示例10: OnLight
void CCubeTool::OnLight ()
{
if (!GetMine ())
return;
UpdateData (TRUE);
m_mine->CurrSeg ()->static_light = (FIX) (m_nLight * 24 * 327.68);
theApp.SetModified (TRUE);
}
开发者ID:paud,项目名称:d2x-xl,代码行数:8,代码来源:cubedlg.cpp
示例11: OnAddEquipGen
void CCubeTool::OnAddEquipGen ()
{
if (!GetMine ())
return;
m_mine->AddEquipMaker ();
m_nLastCube = -1;
Refresh ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:8,代码来源:cubedlg.cpp
示例12: OnAddBotGen
void CCubeTool::OnAddBotGen ()
{
if (!GetMine ())
return;
m_mine->AddRobotMaker ();
m_nLastCube = -1;
Refresh ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:8,代码来源:cubedlg.cpp
示例13: OpenPlace
static void OpenPlace(HANDLE hDlg,BoardParams *DlgParams,int row,int col,CHECK_OPEN_PLACE check)
{
FarDialogItem DialogItem; int color;
if(row<0) return;
if(col<0) return;
if(row>=DlgParams->width) return;
if(col>=DlgParams->height) return;
Info.SendDlgMessage(hDlg,DM_GETDLGITEMSHORT,DlgParams->width*col+row,&DialogItem);
if(GET_DATA_1(DialogItem)==STATE_CLOSE)
{
SET_DATA_1(DialogItem,STATE_OPEN);
DialogItem.VBuf[1].Char=GetChar(GET_DATA_0(DialogItem),GET_DATA_1(DialogItem),&color);
int bgcolor=GetBG(row,col,GET_DATA_1(DialogItem));
DialogItem.VBuf[0].Attributes.ForegroundColor=DialogItem.VBuf[1].Attributes.ForegroundColor=DialogItem.VBuf[2].Attributes.ForegroundColor=color;
DialogItem.VBuf[0].Attributes.BackgroundColor=DialogItem.VBuf[1].Attributes.BackgroundColor=DialogItem.VBuf[2].Attributes.BackgroundColor=bgcolor;
Info.SendDlgMessage(hDlg,DM_SETDLGITEMSHORT,DlgParams->width*col+row,&DialogItem);
if(!GET_DATA_0(DialogItem))
{
OpenPlace(hDlg,DlgParams,row-1,col-1,COP_NONE);
OpenPlace(hDlg,DlgParams,row-1,col,COP_NONE);
OpenPlace(hDlg,DlgParams,row-1,col+1,COP_NONE);
OpenPlace(hDlg,DlgParams,row,col-1,COP_NONE);
OpenPlace(hDlg,DlgParams,row,col+1,COP_NONE);
OpenPlace(hDlg,DlgParams,row+1,col-1,COP_NONE);
OpenPlace(hDlg,DlgParams,row+1,col,COP_NONE);
OpenPlace(hDlg,DlgParams,row+1,col+1,COP_NONE);
}
if(check!=COP_NONE) CheckStop(hDlg,DlgParams,row,col);
}
else if(check==COP_CHECK_ALL&&GET_DATA_1(DialogItem)==STATE_OPEN&&GET_DATA_0(DialogItem)>0&&GET_DATA_0(DialogItem)<9)
{
int mines=0;
mines+=GetMine(row-1,col-1,hDlg,DlgParams,true);
mines+=GetMine(row-1,col,hDlg,DlgParams,true);
mines+=GetMine(row-1,col+1,hDlg,DlgParams,true);
mines+=GetMine(row,col-1,hDlg,DlgParams,true);
mines+=GetMine(row,col+1,hDlg,DlgParams,true);
mines+=GetMine(row+1,col-1,hDlg,DlgParams,true);
mines+=GetMine(row+1,col,hDlg,DlgParams,true);
mines+=GetMine(row+1,col+1,hDlg,DlgParams,true);
if(mines==GET_DATA_0(DialogItem)) //FIXME
{
OpenPlace(hDlg,DlgParams,row-1,col-1,COP_CHECK_STOP);
OpenPlace(hDlg,DlgParams,row-1,col,COP_CHECK_STOP);
OpenPlace(hDlg,DlgParams,row-1,col+1,COP_CHECK_STOP);
OpenPlace(hDlg,DlgParams,row,col-1,COP_CHECK_STOP);
OpenPlace(hDlg,DlgParams,row,col+1,COP_CHECK_STOP);
OpenPlace(hDlg,DlgParams,row+1,col-1,COP_CHECK_STOP);
OpenPlace(hDlg,DlgParams,row+1,col,COP_CHECK_STOP);
OpenPlace(hDlg,DlgParams,row+1,col+1,COP_CHECK_STOP);
CheckStop(hDlg,DlgParams,row,col);
}
}
}
开发者ID:Maximus5,项目名称:evil-programmers,代码行数:55,代码来源:farmine.cpp
示例14: GetAdjacentSide
bool CTextureTool::GetAdjacentSide (INT16 start_segment, INT16 start_side, INT16 linenum,
INT16 *adj_segnum, INT16 *adj_sidenum)
{
if (!GetMine ())
return false;
CDSegment *seg;
INT16 sidenum,childnum;
INT16 point0,point1,vert0,vert1;
INT16 childs_side,childs_line;
INT16 childs_point0,childs_point1,childs_vert0,childs_vert1;
int side_child[6][4] = {
{4,3,5,1},
{2,4,0,5},
{5,3,4,1},
{0,4,2,5},
{2,3,0,1},
{0,3,2,1}
};
// figure out which side of child shares two points w/ start_side
// find vert numbers for the line's two end points
point0 = line_vert[side_line[start_side][linenum]][0];
point1 = line_vert[side_line[start_side][linenum]][1];
seg = m_mine->Segments () + start_segment;
vert0 = seg->verts[point0];
vert1 = seg->verts[point1];
sidenum = side_child[start_side][linenum];
childnum = seg->children[sidenum];
if (childnum < 0 || childnum >= m_mine->SegCount ())
return false;
for (childs_side=0;childs_side<6;childs_side++) {
seg = m_mine->Segments () + childnum;
if ((seg->children[childs_side] == -1) ||
(seg->sides[childs_side].nWall < m_mine->GameInfo ().walls.count)) {
for (childs_line=0;childs_line<4;childs_line++) {
// find vert numbers for the line's two end points
childs_point0 = line_vert[side_line[childs_side][childs_line]][0];
childs_point1 = line_vert[side_line[childs_side][childs_line]][1];
childs_vert0 = seg->verts[childs_point0];
childs_vert1 = seg->verts[childs_point1];
// if points of child's line == corresponding points of parent
if (childs_vert0 == vert1 && childs_vert1 == vert0 ||
childs_vert0 == vert0 && childs_vert1 == vert1) {
// now we know the child's side & line which touches the parent
// child: childnum, childs_side, childs_line, childs_point0, childs_point1
// parent: start_segment, start_side, linenum, point0, point1
*adj_segnum = childnum;
*adj_sidenum = childs_side;
return true;
}
}
}
}
return false;
}
开发者ID:paud,项目名称:d2x-xl,代码行数:57,代码来源:texturedlg.cpp
示例15: OnDeleteObj
void CCubeTool::OnDeleteObj ()
{
if (!GetMine ())
return;
CDSegment *seg = m_mine->CurrSeg ();
if (IsBotMaker (seg))
DeleteBot ();
else if (IsEquipMaker (seg))
DeleteEquip ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:10,代码来源:cubedlg.cpp
示例16: OnAddWall
void CWallTool::OnAddWall ()
{
if (!GetMine ())
return;
CDWall *wall;
CDSegment *seg [2];
CDSide *side [2];
INT16 segnum [2];
INT16 sidenum [2];
bool bRefresh = false;
m_bDelayRefresh = true;
seg [0] = m_mine->CurrSeg ();
side [0] = m_mine->CurrSide ();
segnum [0] = m_mine->Current ()->segment;
sidenum [0] = m_mine->Current ()->side;
if (m_mine->GetOppositeSide (segnum [1], sidenum [1], segnum [0], sidenum [0])) {
seg [1] = m_mine->Segments (segnum [1]);
side [1] = seg [1]->sides + sidenum [1];
}
for (BOOL bSide = FALSE; bSide <= m_bBothSides; bSide++)
if (side [bSide]->nWall < m_mine->GameInfo ().walls.count)
ErrorMsg ("There is already a wall at that side of the current cube.");
else if (m_mine->GameInfo ().walls.count >= MAX_WALLS)
ErrorMsg ("The maximum number of walls is already reached.");
else {
if ((file_type != RDL_FILE) && (seg [bSide]->children [sidenum [bSide]] == -1))
m_mine->AddWall (-1, -1, WALL_OVERLAY, 0, KEY_NONE, -2, m_defOvlTexture);
else if (wall = m_mine->AddWall (segnum [bSide], sidenum [bSide], m_defWall.type, m_defWall.flags,
m_defWall.keys, m_defWall.clip_num, m_defTexture)) {
if (wall->type == m_defWall.type) {
wall->hps = m_defWall.hps;
wall->cloak_value = m_defWall.cloak_value;
}
else if (wall->type == WALL_CLOAKED) {
wall->hps = 0;
wall->cloak_value = 16;
}
else {
wall->hps = 0;
wall->cloak_value = 31;
}
}
// update main window
bRefresh = true;
}
m_bDelayRefresh = false;
if (bRefresh) {
theApp.MineView ()->Refresh ();
Refresh ();
}
}
开发者ID:paud,项目名称:d2x-xl,代码行数:55,代码来源:walldlg.cpp
示例17: InitCBWallNo
void CWallTool::InitCBWallNo ()
{
if (!GetMine ())
return;
CComboBox *pcb = CBWallNo ();
pcb->ResetContent ();
int i;
for (i = 0; i < m_mine->GameInfo ().walls.count; i++)
pcb->AddString (itoa (i, message, 10));
pcb->SetCurSel (m_nWall [0]);
}
开发者ID:paud,项目名称:d2x-xl,代码行数:11,代码来源:walldlg.cpp
示例18: OnAddTarget
void CReactorTool::OnAddTarget ()
{
if (!GetMine ())
return;
int segnum, sidenum;
UpdateData (TRUE);
sscanf (m_szTarget, "%d,%d", &segnum, &sidenum);
if ((segnum < 0) || (segnum >= m_mine->SegCount ()) || (sidenum < 1) || (sidenum > 6))
return;
AddTarget (segnum, sidenum);
}
开发者ID:paud,项目名称:d2x-xl,代码行数:11,代码来源:reactordlg.cpp
示例19: OnAddWallTarget
void CReactorTool::OnAddWallTarget ()
{
if (!GetMine ())
return;
CDSelection *other = (m_mine->Current () == &m_mine->Current1 ()) ? &m_mine->Current2 () : &m_mine->Current1 ();
int i = FindTarget (other->segment, other->side);
if (i < 0)
return;
LBTargets ()->SetCurSel (i);
OnAddTarget ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:11,代码来源:reactordlg.cpp
示例20: OnResetCoord
void CCubeTool::OnResetCoord ()
{
if (!GetMine ())
return;
m_nVertex = m_mine->CurrSeg ()->verts[side_vert[m_mine->Current ()->side][m_mine->Current ()->point]];
m_nCoord [0] = (double) m_mine->Vertices (m_nVertex)->x / 0x10000L;
m_nCoord [1] = (double) m_mine->Vertices (m_nVertex)->y / 0x10000L;
m_nCoord [2] = (double) m_mine->Vertices (m_nVertex)->z / 0x10000L;
UpdateData (FALSE);
theApp.MineView ()->Refresh (false);
}
开发者ID:paud,项目名称:d2x-xl,代码行数:11,代码来源:cubedlg.cpp
注:本文中的GetMine函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论