Exemplo n.º 1
0
void drawScore() {
  if ( dsc == score ) return;
  dsc = score;
  clearLPanel();
  drawNum(score, 118, 24, 28, 16*1-12, 16*1-3);
  drawNum(bonusScore, 24, 14, 16, 16*1-12, 16*1-3);
}
//senquack - allow rotated screen
//void drawScore() {
//  drawNum(score, 118, 24, 28, 200, 200, 222);
//  drawNum(bonusScore/10*10, 24, 14, 16, 200, 200, 222);
//}
void drawScore() {
   if (!settings.rotated) {
      drawNum(score, 118, 24, 28, 200, 200, 222);
      drawNum(bonusScore/10*10, 24, 14, 16, 200, 200, 222);

   } else {
      if (status != TITLE)
//         drawNumHoriz(score, 310, 65, 6, 210, 210, 240);
         drawNumHoriz(score, 167, 50, 6, 210, 210, 240);
   }
}
Exemplo n.º 3
0
void drawTime(int seconds)
{
	int newSeconds;
	int newMinutes;

	secondsToTime(seconds,&newSeconds,&newMinutes);

	drawNum(newSeconds/10, 926, 35);
	drawNum(newSeconds%10, 938, 35);
	vg_draw("/usr/src/drivers/proj/images/image_10.mg", 22, 8, 950, 35);
	drawNum(newMinutes/10, 958, 35);
	drawNum(newMinutes%10, 970, 35);
}
Exemplo n.º 4
0
void numstring(uint8_t *buff, uint8_t x, char *c)
{
	while ((c[0] != 0) && (x + 26 <= LCDWIDTH)) 
	{
		drawNum(buff, x, c[0]);
		c++;
		x += 27; // each char is 26 pixels wide
	}
}
Exemplo n.º 5
0
HRESULT TimgFilterShowMV::process(TfilterQueue::iterator it,TffPict &pict,const TfilterSettingsVideo *cfg0)
{
    if (is(pict,cfg0)) {
        const TvisSettings *cfg=(const TvisSettings*)cfg0;
        const TvideoCodecDec *movie;
        deciV->getMovieSource(&movie);
        init(pict,0,0);
        unsigned char *dstY=NULL;
        if (movie && (movie->caps()&(TvideoCodec::CAPS::VIS_MV|TvideoCodec::CAPS::VIS_QUANTS))) {
            if (cfg->mv) {
                getCurNext(FF_CSPS_MASK_YUV_PLANAR,pict,0,COPYMODE_DEF,&dstY,NULL,NULL,NULL);
                movie->drawMV(dstY,dx1[0],stride2[0],dy1[0]);
            }
            if (cfg->quants && movie->quants) {
                if (!dstY) {
                    getCurNext(FF_CSPS_MASK_YUV_PLANAR,pict,0,COPYMODE_DEF,&dstY,NULL,NULL,NULL);
                }
                const unsigned char *quants=(const unsigned char*)movie->quants;
                for (unsigned int y=4; y<=dy1[0]-12; y+=16,quants+=movie->quantsStride*movie->quantBytes) {
                    const unsigned char *q=quants;
                    for (unsigned int x=0; x<=dx1[0]-12; x+=16,q+=movie->quantBytes) {
                        unsigned int qq=*q;
                        if (qq>99) {
                            qq=99;
                        }
                        if (qq/10) {
                            drawNum(numsL+(qq/10)*64,maskL,dstY+(x+4)+y*stride2[0],stride2[0]);
                            drawNum(numsR+(qq%10)*64,maskR,dstY+(x+4)+y*stride2[0],stride2[0]);
                        } else {
                            drawNum(numsL+qq*64,maskL,dstY+(x+6)+y*stride2[0],stride2[0]);
                        }
                    }
                }
                _mm_empty();
            }
        }
        if (cfg->graph) {
            if (!dstY) {
                getCurNext(FF_CSPS_MASK_YUV_PLANAR,pict,0,COPYMODE_DEF,&dstY,NULL,NULL,NULL);
            }
            if (frames.empty()) {
                frames.resize(2000);
            }
            frames.erase(frames.begin());
            frames.push_back(Tframe(pict.srcSize,pict.frametype));
            unsigned char *dst=dstY+(dy1[0]-1)*stride2[0];
            size_t max=0;
            for (unsigned int i=2000-dx1[0]; i<2000; i++)
                if (frames[i].first>max) {
                    max=frames[i].first;
                }
            if (max)
                for (unsigned int i=2000-dx1[0]; i<2000; i++,dst++) {
                    Tframe &f=frames[i];
                    unsigned char c;
                    switch (f.second&FRAME_TYPE::typemask) {
                        case FRAME_TYPE::I:
                            c=255;
                            break;
                        case FRAME_TYPE::P:
                            c=210;
                            break;
                        case FRAME_TYPE::B:
                            c=170;
                            break;
                        default:
                            c=130;
                            break;
                    }
                    for (unsigned char *dst1=dst,*dst1end=dst1-std::min(int((dy1[0]/4)*f.first/max),int(dy1[0])-1)*stride2[0]; dst1!=dst1end; dst1-=stride2[0]) {
                        *dst1=c;
                    }
                }
        }
    }
    return parent->processSample(++it,pict);
}
Exemplo n.º 6
0
void display(void)
{
  glClear(GL_COLOR_BUFFER_BIT);
  

  // 三角形要素or四角形要素の描画
  glLineWidth(1.0f);
  if(data.form <=2 ) glBegin(GL_TRIANGLES);
  else glBegin(GL_QUADS);
  glColor3d(0.7,0.7,0.7);
  for(int i=0;i<data.elem.size();i++){
    Element e = data.elem[i];
    for(int j=0;j<data.vertexNum;j++) glVertex2d(e.p[j]->z,e.p[j]->r);
  }
  glEnd();

  // 境界の描画
  if(data.isDispBoundary){
    glLineWidth(3.0f);
    glBegin(GL_LINES);
    glColor3d(1.0,0.0,0.0);
    for(int i=0;i<data.edge.size();i++){
      Edge *e = data.edge[i];
      if(typeid(*e) == typeid(Str)){
	glVertex2d( e->p[0]->z, e->p[0]->r );
	glVertex2d( e->p[1]->z, e->p[1]->r );
      }else{
	Cir *c = dynamic_cast<Cir*>(e);
      
	double dt = c->rad/9;
	for(double rad1 = 0;fabs(rad1) < fabs(c->rad) ; rad1+=dt){
	  double z1,r1,z2,r2;
	  double rad2 = rad1 + dt;
	  z1 = c->center.z + c->r*cos(c->baseRad-rad1);
	  r1 = c->center.r + c->r*sin(c->baseRad-rad1);
	  z2 = c->center.z + c->r*cos(c->baseRad-rad2);
	  r2 = c->center.r + c->r*sin(c->baseRad-rad2);
	  glVertex2d(z1,r1);
	  glVertex2d(z2,r2);
	} 
      }
    }
    glEnd();
  }

  // 要素間の境界線の描画
  glLineWidth(1.0f);
  glBegin(GL_LINES);
  glColor3d(0.4,0.4,0.4);
  for(int i=0;i<data.elem.size();i++){
    Element e = data.elem[i];
    for(int j=0;j<data.vertexNum;j++){
      glVertex2d( e.p[j]->z , e.p[j]->r );
      glVertex2d( e.p[(j+1)% data.vertexNum]->z , e.p[(j+1)% data.vertexNum]->r );
    }
  }    
  glEnd();

  // ノード番号の出力
  if(data.isDispNodenum){
    glColor3d(0,0,0);
    for(int i=0;i<data.node.size();i++){
      int num = data.node[i].id;
      //if(data.node[i].id > data.firstNodenum ) num += 3;
      drawNum(num,data.node[i].z,data.node[i].r);
    }
  }
  glFlush();
}
Exemplo n.º 7
0
void drawScore() {
    drawNum(score, 118, 24, 28, 200, 200, 222);
    drawNum(bonusScore/10*10, 24, 14, 16, 200, 200, 222);
}
Exemplo n.º 8
0
void Drawer::drawUI( ) {
	UIPtr ui = UIPtr( new UI );
	//残った操作回数。
	drawNum( 18, 25, ui->canChangeNum( ) );
}