📄 test.cpp
字号:
#include "gengine.h"
#include "../common.h"
static DWORD lasttime=0, ttime;
static ControlEvent input;
int testGraphicEngine( void )
{
ttime = GetTickCount();
if( ttime - lasttime < 49 )
return 0;
lasttime = ttime;
#ifdef _DEBUG
// OutDebugString( "in testGraphicEngine" );
#endif
// testBrighter();
// testSprite();
// testRleBitmap();
// testAni();
if( mouseB ){
input.what = ctMouse;
input.info[0] = mouseB;
scene.PixelToPlot( mouseX, mouseY, (int*)&input.info[1], (int*)&input.info[2] );
mouseB = 0;
//OutDebugString( "mouse down" );
//OutDebugInt( "mousex=", input.info[1] );
//OutDebugInt( "mousey=", input.info[2] );
}
else
input.what = ctNothing;
warrior->UpdateStatus( &input );
//OutDebugString( "before scene.update" );
scene.Update();
//OutDebugString( "before warrior.update" );
//warrior->Update();
//OutDebugString( "after update" );
hz.Printf( backScreen, 0, 13, 0xffffff, "mousex:%d, mouseY:%d", input.info[1], input.info[2] );
hz.Printf( backScreen, 0, 26, 0xffffff, "mousex:%d, mouseY:%d", mouseX, mouseY );
hz.Printf( backScreen, 0, 39, 0xffffff, "herox:%d, heroY:%d", warrior->mx, warrior->my );
#ifndef _OFFDDRAW
UpdateScreen();
#endif
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -