本文整理汇总了C++中DrawScreen函数的典型用法代码示例。如果您正苦于以下问题:C++ DrawScreen函数的具体用法?C++ DrawScreen怎么用?C++ DrawScreen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DrawScreen函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Button28OnClick
void Button28OnClick() {
unsigned char l,cnt[4];
if(i==6) {
if(a==0) {
a=1;
i=0;
InitMCU();
SF_Start();
SF_mem();
Write_Log("Security armed");
}
else {
i=0;
InitMCU();
SF_Start();
SF_rem();
Write_Log("Security disarmed");
}
DrawScreen(&System_Log_Screen);
Delay_ms(2000);
strcpy(Label24.Caption," ");
hom=1;
DrawScreen(&Home);
}
}
示例2: SF_mem
void SF_mem()
{
unsigned char i,l,cnt[4];
long adr=0x111111;
for(i=0;i<6;i++) {
SerialFlash_WriteByte(arm[i],adr);
adr+=0x000020;
}
strcpy(Label24.Caption," ******");
DrawScreen(&System_Log_Screen);
for(l=0;l<10;l++) {
ByteToStr(10-l,cnt);
strcpy(Label25.Caption," ");
strcat(Label25.Caption,cnt);
DrawScreen(&System_Log_Screen);
FT812_Sound_SetAndPlay(_FT812_SOUND_CLICK,_FT812_SOUND_PITCH_B3,vol);
Delay_ms(1000);
}
Box30.Color=0x00FF0000;
Box36.Color=0x00FF0000;
Image65.Visible=0;
Image66.Visible=1;
strcpy(Label25.Caption," ARMED");
strcpy(Label8.Caption," ARMED");
}
示例3: Gameplay
/**
* Runs the game.
* @param track file
* @return
*/
int Gameplay(FILE* track)
{
int sleeptime = START_PERIOD;
int freeze = 0;
size_t count = 0;
unsigned planepos = SCREEN_WIDTH / 2;
DrawScreen();
while (1)
{
usleep(sleeptime);
if (sleeptime > 100 * 1000)
sleeptime = sleeptime - sleeptime / 20;
if (input.key_pressed == quit) //TODO: Handle quit
{
break;
}
if (freeze)
{
continue;
}
if (!ScrollScreen(track))
{
mvprintw(SCREEN_HEIGHT / 2, 10, " Track completed! ");
refresh();
freeze = 1;
continue;
}
pthread_mutex_lock(&input.lock);
if ((input.key_pressed == left) && planepos > 0) // TODO: Handle left movement
{
planepos--;
input.key_pressed = not_pressed;
}
if ((input.key_pressed == right) && planepos < SCREEN_WIDTH - 1) // TODO: Handle right movement
{
planepos++;
input.key_pressed = not_pressed;
}
pthread_mutex_unlock(&input.lock);
if (screen[SCREEN_WIDTH * (SCREEN_HEIGHT - 1) + planepos] == OBSTACLE)
{
// Ohhh no... Crash!
mvprintw(SCREEN_HEIGHT / 2, 10, " CRASH! Game over. ");
refresh();
freeze = 1;
continue;
}
screen[SCREEN_WIDTH * (SCREEN_HEIGHT - 1) + planepos] = PLANE;
DrawScreen();
mvprintw(0, 0, " %zu ", count++);
refresh();
}
return 0;
}
示例4: DrawScreen
bool OpenGLSWFrameBuffer::Wiper_Crossfade::Run(int ticks, OpenGLSWFrameBuffer *fb)
{
Clock += ticks;
// Put the initial screen back to the buffer.
DrawScreen(fb, fb->InitialWipeScreen);
// Draw the new screen on top of it.
DrawScreen(fb, fb->FinalWipeScreen, GL_FUNC_ADD, ColorValue(0,0,0,Clock / 32.f), ColorRGBA(255,255,255,0));
return Clock >= 32;
}
示例5: DrawScreen
bool D3DFB::Wiper_Crossfade::Run(int ticks, D3DFB *fb)
{
Clock += ticks;
// Put the initial screen back to the buffer.
DrawScreen(fb, fb->InitialWipeScreen);
// Draw the new screen on top of it.
DrawScreen(fb, fb->FinalWipeScreen, D3DBLENDOP_ADD,
D3DCOLOR_COLORVALUE(0,0,0,Clock / 32.f), D3DCOLOR_RGBA(255,255,255,0));
return Clock >= 32;
}
示例6: CircleButton7OnPress
void CircleButton7OnPress() {
if((Box62.Left+Box62.Width)>=(Box64.Left+Box64.Width)) Box64.Left+=1;
d_l[choice_t]=0+(int)floor((Box64.Left-219)*100/197);
dim_l[choice_t]=Box64.Left;
IntToStr(d_l[choice_t],Label97.Caption);
DrawScreen(&Light_Mode);
}
示例7: while
void
App::Run()
{
//
// Initialize the event handler
//
EventManager eventHandler;
// Main game loop
while(1)
{
//
// Draw the next screen
//
DrawScreen();
// Step the physics world
PhysicsWorld::GetInstance()->Step(1.0 / 60.0);
// Sleep
SDL_Delay(1000.0 / 60.0);
//
// Handle events
//
while(eventHandler.IsEventWaiting())
eventHandler.HandleEvent();
}
}
示例8: SM_BT_MMClick
void SM_BT_MMClick() {
// Go back to Main Screen
Counterflag = 0;
remote_mod=0;
DrawScreen(&MainMenu);
}
示例9: doSettings
void doSettings() {
BLED_Fade_Out();
DrawScreen(&Settings);
BLED_Fade_In();
Logger_State = 2;
}
示例10: ChangeResolution
void ChangeResolution()
{
if (bFullScreen)
{
if (vmVideoMode==vmGraph512)
sfScreen = SDL_SetVideoMode(512, 384, 8,
SDL_SWSURFACE | SDL_FULLSCREEN |
SDL_HWPALETTE);
else if (vmVideoMode==vmGraph800)
sfScreen = SDL_SetVideoMode(800, 600, 8,
SDL_SWSURFACE | SDL_FULLSCREEN |
SDL_HWPALETTE);
else
sfScreen = SDL_SetVideoMode(640, 480, 8,
SDL_SWSURFACE | SDL_FULLSCREEN |
SDL_HWPALETTE);
SDL_ShowCursor(SDL_DISABLE);
}
else
{
if (vmVideoMode==vmGraph512)
sfScreen = SDL_SetVideoMode(512, 384, 8,
SDL_SWSURFACE | SDL_HWPALETTE);
else if (vmVideoMode==vmGraph800)
sfScreen = SDL_SetVideoMode(800, 600, 8,
SDL_SWSURFACE | SDL_HWPALETTE);
else
sfScreen = SDL_SetVideoMode(640, 480, 8,
SDL_SWSURFACE | SDL_HWPALETTE);
SDL_ShowCursor(SDL_ENABLE);
}
//printf("w=%d, h=%d, pitch=%d\n",SDL_GetVideoSurface()->w,SDL_GetVideoSurface()->h,SDL_GetVideoSurface()->pitch);
SetPalette();
DrawScreen();
}
示例11: Button40OnClick
void Button40OnClick() {
char i;
if(ti!=1 && tim[1]!=1) {
ti=1;
dat=2;
Button39.Color=0x00800000;
Button40.Color=0x00FF0000;
Button41.Color=0x00800000;
Button42.Color=0x00800000;
Button46.Color=0x00800000;
Label34.Font_Color=0x00FFFFFF;
Label44.Font_Color=0x00400000;
Label45.Font_Color=0x00FFFFFF;
Label71.Font_Color=0x00FFFFFF;
Label72.Font_Color=0x00FFFFFF;
strcpy(Label44.Caption,"Minutes: ");
datum.min=0;
for(i=2;i<4;i++) {
date[i]=0;
}
DrawScreen(&Settings_Screen);
}
}
示例12: Button39OnClick
void Button39OnClick() {
char i;
if(ti!=0 && tim[0]!=1) {
ti=0;
dat=0;
Button39.Color=0x00FF0000;
Button40.Color=0x00800000;
Button41.Color=0x00800000;
Button42.Color=0x00800000;
Button46.Color=0x00800000;
Label34.Font_Color=0x00400000;
Label44.Font_Color=0x00FFFFFF;
Label45.Font_Color=0x00FFFFFF;
Label71.Font_Color=0x00FFFFFF;
Label72.Font_Color=0x00FFFFFF;
strcpy(Label34.Caption,"Hour: ");
datum.hour=0;
for(i=0;i<2;i++) {
date[i]=0;
}
DrawScreen(&Settings_Screen);
}
}
示例13: Button11OnClick
void Button11OnClick() {
unsigned char i;
strcpy(Label73.Caption,"");
strcpy(Label75.Caption,"");
strcpy(Label76.Caption,"");
strcpy(Label77.Caption,"");
strcpy(Label78.Caption,"");
strcpy(Label34.Caption,"Hours: ");
strcpy(Label44.Caption,"Minutes: ");
strcpy(Label45.Caption,"Day: ");
strcpy(Label71.Caption,"Month: ");
strcpy(Label72.Caption,"Year: ");
for(i=0;i<12;i++) {
date[i]=0;
}
for(i=0;i<5;i++) {
tim[i]=0;
}
dat=0;
datum.hour=0;
datum.min=0;
datum.day=0;
datum.mon=0;
datum.year=0;
Button39OnClick();
DrawScreen(&Settings_Screen);
}
示例14: Box24OnClick
void Box24OnClick() {
CheckBox1.Checked=1-CheckBox1.Checked;
DrawScreen(&Keyboard_Screen);
vol=255-vol;
FT812_Sound_SetAndPlay(_FT812_SOUND_XYLOPHONE,_FT812_SOUND_PITCH_B3,vol);
Delay_ms(1000);
}
示例15: Button27OnClick
void Button27OnClick() {
char cnt;
for(cnt=0;cnt<=5;cnt++) arm[cnt]=0;
i=0;
strcpy(Label24.Caption,"");
DrawScreen(&System_Log_Screen);
}