void core::CoreAPI::DrawCenterWin(int wy, int ww, int wh,byte wBorderColor,int size__,std::vector<core::MenuItem> Items) { SMALL_RECT rect = GetRect(); int x = ((rect.Left+rect.Right)/2)-ww/2; DrawWin(x,wy,ww,wh,wBorderColor,size__,Items); }
void paint(CatLoveDog_InGame *myself) { gm_s16 num,i,a,b; //g.setColor(0, 0, setColor); //g.fillRect(0, 0, screenw, screenh); myself->picLib->FillRect(myself->picLib,0,0,SCREEN_WIDTH,SCREEN_HEIGHT,GAME_ToRGB(0,0,myself->setColor)); myself->picLib->DrawImage(myself->picLib,myself->beijing,0,0); /////画风向条背景 myself->picLib->DrawImageEx(myself->picLib,myself->windImg,(SCREEN_WIDTH - myself->picLib->GetImageWidth(myself->picLib,myself->windImg))/2, (SCREEN_HEIGHT- myself->picLib->GetImageHeight(myself->picLib,myself->windImg))/2 -143,true,0); //lifeD.LifeD(g, changelifeD); ///////////////画玩家的生命值 num=(myself->dogBlood-myself->changelifeD)*5/myself->dogBlood; for(i=0;i<num;i++) { #ifdef GAME_240_320 //g.drawImage(Contrl.menu.LifeImageD,(Contrl.game.screenw-Contrl.game.beijing[0].getWidth())/2+165+this.Blood-12*i,(Contrl.game.screenh-Contrl.game.beijing[0].getHeight())/2+280,Graphics.TOP | Graphics.LEFT); myself->picLib->DrawImage(myself->picLib,myself->lifeImageD,165+myself->dogBlood-12*i,280); #endif } //lifeC.LifeC(g, changelifeC); num=(myself->catBlood-myself->changelifeC)*5/myself->catBlood; for(i=0;i<num;i++) { #ifdef GAME_240_320 //g.drawImage(Contrl.menu.LifeImageC,(Contrl.game.screenw-Contrl.game.beijing[0].getWidth())/2+5+12*i,(Contrl.game.screenh-Contrl.game.beijing[0].getHeight())/2+280,Graphics.TOP | Graphics.LEFT); myself->picLib->DrawImage(myself->picLib,myself->lifeImageC,5+12*i,280); #endif } myself->picLib->DrawRegionEx(myself->picLib,myself->catImg,myself->catPX,225,55*myself->cattu,0,55,55,true,0); myself->picLib->DrawRegionEx(myself->picLib,myself->dogImg,180,225,55*myself->dogtu,0,55,55,true,0); bombMove(myself); drawWind(myself); //fish.DrawSelf(g); fishDrawSelf(myself); //bone.DrawSelf(g); dogDrawSelf(myself); if(myself->fishShow == true) { myself->picLib->DrawRegionEx(myself->picLib,myself->fishImg,myself->fishPX,myself->fishPY,myself->fishFrame*25,0,25,25,true,0); } if(myself->boneShow == true) { myself->picLib->DrawRegionEx(myself->picLib,myself->boneImg,myself->bonePX,myself->bonePY,myself->boneFrame*25,0,25,25,true,0); } Press_fire(myself); bomb(myself); if(myself->teshu) { a= myself->bonePX; b= myself->bonePY; } if(myself->bombShow == true) bombShowPaint(a,b,myself); if(myself->teshu) { myself->bonePX = 500; myself->bonePY = 500; myself->teshu = false; } DrawOver(myself); DrawWin(myself); if (myself->alive) { if (!myself->isPause) { myself->picLib->DrawRegionEx(myself->picLib,myself->buttonImg,SCREEN_WIDTH-48,SCREEN_HEIGHT-18,0,0,48,18,true,0); } else { myself->picLib->DrawRegionEx(myself->picLib,myself->buttonImg,SCREEN_WIDTH-48,SCREEN_HEIGHT-18,0,18,48,18,true,0); myself->picLib->DrawRegionEx(myself->picLib,myself->buttonImg,0,SCREEN_HEIGHT-18,0,36,48,18,true,0); } } else { myself->picLib->DrawRegionEx(myself->picLib,myself->buttonImg,0,SCREEN_HEIGHT-18,0,36,48,18,true,0); } }