bool CGameScene::_HandleSuperKey()
{
#ifdef _DEBUG
if(g_pGameApp->IsKeyDown(DIK_V))
{
EnableSceneObjCulling(1 - IsSceneObjCulling());
TipI(IsSceneObjCulling(), g_oLangRec.GetString(329), g_oLangRec.GetString(330));
}
else if(g_pGameApp->IsKeyDown(DIK_F5))
{
static BOOL g_bEnablePrint = FALSE;
g_bEnablePrint = 1 - g_bEnablePrint;
g_Render.EnablePrint(INFO_FPS, g_bEnablePrint);
g_Render.EnablePrint(INFO_DEBUG, g_bEnablePrint);
TipI(g_bEnablePrint, g_oLangRec.GetString(331), g_oLangRec.GetString(332));
}
else if(g_pGameApp->IsKeyDown(DIK_F6))
{
//g_pGameApp->ResetGameCamera();
Tip(g_oLangRec.GetString(333));
}
else if(g_pGameApp->IsKeyDown(DIK_F7))
{
this->ShowSceneObjTerrain(1 - this->IsSceneObjTerrainVisible());
TipI(this->IsSceneObjTerrainVisible(), g_oLangRec.GetString(334), g_oLangRec.GetString(335));
}
else if(g_pGameApp->IsKeyDown(DIK_F8))
{
this->ShowSceneObj(1 - this->IsSceneObjVisible());
TipI(this->IsSceneObjVisible(), g_oLangRec.GetString(336), g_oLangRec.GetString(337));
}
else if (g_pGameApp->IsKeyDown(DIK_F9)) //???РїС—Р…??active??section????????????????
{
/*
// ????????????РїС—Р…???
// ????MPMap::DynamicLoading()????????????????????????section??РїС—Р…??????
const int ciSectionWidth = 8; // ?????tile?????
const int ciSectionHeight = 8; // ?????tile
const int ciRefreshWidth = 3; // ?????РїС—Р…?section?????????section
const int ciRefreshHeight = 3; // ?????РїС—Р…?section????????section
const int ciMaxObjWidth = 2; // ????????????????section
const int ciMaxObjHeight = 2; // ???????????????section
int iShowSizeX, iShowSizeY; // ?????tile
int iShowCenterX, iShowCenterY; // ?????tile
int iSaveSectionBuffer;
int iOriginalWidth, iOriginalHeight;
float fOriginalCenterX, fOriginalCenterY;
fOriginalCenterX = _pTerrain->GetShowCenterX();
fOriginalCenterY = _pTerrain->GetShowCenterY();
iOriginalWidth = _pTerrain->GetShowWidth();
iOriginalHeight = _pTerrain->GetShowHeight();
iShowCenterX = ((int)_pTerrain->GetShowCenterX() / ciSectionWidth) * ciSectionWidth + ciSectionWidth / 2;
iShowCenterY = ((int)_pTerrain->GetShowCenterY() / ciSectionHeight) * ciSectionHeight + ciSectionHeight / 2;
_pTerrain->SetShowCenter((float)iShowCenterX, (float)iShowCenterY);
iShowSizeX = (ciMaxObjWidth * 2 + ciRefreshWidth) * ciSectionWidth;
iShowSizeY = (ciMaxObjHeight * 2 + ciRefreshHeight) * ciSectionHeight;
_pTerrain->SetShowSize(iShowSizeX, iShowSizeY);
iSaveSectionBuffer = (iShowSizeX / ciSectionWidth) * (iShowSizeY / ciSectionHeight);
_pTerrain->SetSectionBufferSize(iSaveSectionBuffer);
_pTerrain->ClearAllSection(TRUE);
_pTerrain->DynamicLoading(GetTickCount());
g_pGameApp->GetCurScene()->ResetAllSceneObjPos();
int i, j;
int iCurSectionY, iCurSectionX;
for (i = 0; i < ciRefreshHeight; i ++)
{
iCurSectionY = (int)_pTerrain->GetShowCenterY() / ciSectionHeight - ciRefreshHeight / 2 + i;
if (iCurSectionY < 0)
continue;
for (j = 0; j < ciRefreshWidth; j ++)
{
iCurSectionX = (int)_pTerrain->GetShowCenterX() / ciSectionWidth - ciRefreshWidth / 2 + j;
if (iCurSectionX < 0)
continue;
g_ObjInfluence.RefreshSectionObjInfluenceInfo(iCurSectionY * _pTerrain->GetSectionCntX() + iCurSectionX);
}
}
_pTerrain->SetSectionBufferSize(MAX_SECTION_BUFFER);
_pTerrain->SetShowCenter(fOriginalCenterX, fOriginalCenterY);
_pTerrain->SetShowSize(iOriginalWidth, iOriginalHeight);
_pTerrain->ClearAllSection(TRUE);
_pTerrain->DynamicLoading(GetTickCount());
*/
}
else if(g_pGameApp->IsKeyDown( (BYTE)DIKEYBOARD_SYSRQ ) )
{
if(g_pGameApp->IsEnableSpAvi())
{
g_pGameApp->EnableSprintAvi(FALSE);
return false;
}
if(g_pGameApp->IsCtrlPress())
g_pGameApp->EnableSprintAvi(TRUE);
else
g_pGameApp->EnableSprintScreen(TRUE);
if(g_pGameApp->IsShiftPress())
{
g_pGameApp->SetStartMinimap(0,0,GetTerrain()->GetWidth()/SHOWRSIZE, GetTerrain()->GetHeight()/SHOWRSIZE);
//g_pGameApp->SetStartMinimap(1500,3000,2, 2);
g_pGameApp->EnableSprintSmMap(TRUE);
}
}
else if(g_pGameApp->IsKeyDown(DIK_INSERT))
{
g_pGameApp->EnableSprintAvi(TRUE);
}
else if(g_pGameApp->IsKeyDown(DIK_HOME))
{
}
else if(g_pGameApp->IsKeyDown(DIK_9))
{
int nWidth = _pTerrain->GetShowWidth();
int nHeight = _pTerrain->GetShowHeight();
if(nWidth > 8 && nHeight > 8)
{
_pTerrain->SetShowSize(nWidth - 1, nHeight - 1);
}
}
else if(g_pGameApp->IsKeyDown(DIK_0))
{
int nWidth = _pTerrain->GetShowWidth();
int nHeight = _pTerrain->GetShowHeight();
_pTerrain->SetShowSize(nWidth + 1, nHeight + 1);
}
else if(g_pGameApp->IsKeyContinue(DIK_F11))
{
this->ShowChairObj(1 - this->IsShowChairObj());
TipI(this->IsShowChairObj(), g_oLangRec.GetString(215), g_oLangRec.GetString(216));
}
else if(g_pGameApp->IsKeyDown(DIK_X))
{
_IsShowPath = !_IsShowPath;
g_pGameApp->AddTipText( g_oLangRec.GetString(338) );
}else if(g_pGameApp->IsKeyDown(DIK_M))
{
if(!_pBigMap->IsLoad())
_pBigMap->Create();
else
_pBigMap->Destory();
}
#endif
return false;
}