0)
Intro_pos++;
// g.setClip(10,10,HorseMidlet.imgIntro[0].getWidth() , HorseMidlet.i
mgIntro[0].getHeight());
// g.drawImage(HorseMidlet.imgIntro[0], 10,-Intro_pos+10, g.LEFT | g.
TOP);
// g.setClip(0, 0, getCanvasWidth(),getCanvasHeight());
g.setClip(0,0,HorseMidlet.imgIntro[0].getWidth() , HorseMidlet.imgIn
tro[0].getHeight());
g.drawImage(HorseMidlet.imgIntro[0], 0,-Intro_pos, g.LEFT | g.TOP);
// if (Intro_pos==HorseMidlet.imgIntro[0].getHeight()-getCanvasHeight
()-100)
// {
// g.drawImage(HorseMidlet.imgIntro[1], 3,getCanvasHeight()-60, g.LEF
T | g.TOP);
// }
g.setClip(0, 0, getCanvasWidth(),getCanvasHeight());
try
{
Thread.sleep(8);
repaint();
}
catch(InterruptedException ie)
{
System.out.println(ie.toString());
}
break;
case HorseMidlet.GAME_STATE_LOT:
// imgMenu = null;
// imgDot = null;
//draw lot
if(HorseMidlet.substate==0)
{
lot_no=HorseMidlet.firstlot_no;
lot_money=HorseMidlet.firstlot_money;
}
if(HorseMidlet.substate==1)
{
lot_no=HorseMidlet.secondlot_no;
lot_money=HorseMidlet.secondlot_money;
}
// Image[] imgLot=new Image[1];
// imgLot=HorseMidlet.getImages("lothorse",1);
g.setColor(105,117,184);
g.fillRect(0,0,getCanvasWidth(),getCanvasHeight());
// g.drawImage(imgLot[0],10,7,g.LEFT|g.TOP);
g.drawImage(imgLot[0],0,7,g.LEFT|g.TOP);
g.setColor(0,0,0);
// g.fillRect(10,46,40,14);
g.fillRect(0,46,40,14);
//draw the name
g.setColor(255,255,255);
// g.drawChars(myHorseRacing.horses[lot_no].m_HorseName,0,3,28,59,1);
g.drawChars(myHorseRacing.horses[lot_no].m_HorseName,0,3,18,59,1);
// Image[] imgTextFirstLot=new Image[1];
if(HorseMidlet.substate==0)
{
// imgTextFirstLot = HorseMidlet.getImages("text_firston", 1);
g.drawImage(imgTextFirstLot1[0],0,61,g.LEFT|g.TOP);
}
else
{
// imgTextFirstLot = HorseMidlet.getImages("text_firstoff", 1);
g.drawImage(imgTextFirstLot2[0],0,61,g.LEFT|g.TOP);
}
// g.drawImage(imgTextFirstLot[0],10,61,g.LEFT|g.TOP);
// g.drawImage(imgTextFirstLot[0],0,61,g.LEFT|g.TOP);
// Image[] imgTextSecondLot=new Image[1];
if(HorseMidlet.substate==1)
{
// imgTextSecondLot = HorseMidlet.getImages("text_secondon", 1);
g.drawImage(imgTextSecondLot1[0],0,74,g.LEFT|g.TOP);
}
else
{
// imgTextSecondLot = HorseMidlet.getImages("text_secondoff", 1);
g.drawImage(imgTextSecondLot2[0],0,74,g.LEFT|g.TOP);
}
// g.drawImage(imgTextSecondLot[0],10,74,g.LEFT|g.TOP);
// g.drawImage(imgTextSecondLot[0],0,74,g.LEFT|g.TOP);
//draw the horse info
g.setColor(255,180,0);
// g.fillRect(60,7,getCanvasWidth()/2+20,getCanvasHeight()/2+4);
//右上角
g.fillRect(50,7,76,getCanvasHeight()/2+4);
g.setColor(0,0,0);
// g.drawRect(60,7,getCanvasWidth()/2+20,getCanvasHeight()/2+4);
g.drawRect(50,7,76,getCanvasHeight()/2+4);
g.setColor(255,255,255);
//draw horse info text
// Image[] imgTextRacingNum=new Image[1];
// imgTextRacingNum=HorseMidlet.getImages("text_racingnum",1);
// g.drawImage(imgTextRacingNum[0],70,13,g.LEFT|g.TOP);
g.drawImage(imgTextRacingNum[0],55,13,g.LEFT|g.TOP);
// Image[] imgTextAge=new Image[1];
// imgTextAge=HorseMidlet.getImages("text_age",1);
// g.drawImage(imgTextAge[0],70,27,g.LEFT|g.TOP);
g.drawImage(imgTextAge[0],55,27,g.LEFT|g.TOP);
// Image[] imgTextExp=new Image[1];
// imgTextExp=HorseMidlet.getImages("text_exp",1);
// g.drawImage(imgTextExp[0],70,41,g.LEFT|g.TOP);
g.drawImage(imgTextExp[0],55,41,g.LEFT|g.TOP);
// Image[] imgTextEndur=new Image[1];
// imgTextEndur=HorseMidlet.getImages("text_endur",1);
// g.drawImage(imgTextEndur[0],70,55,g.LEFT|g.TOP);
g.drawImage(imgTextEndur[0],55,55,g.LEFT|g.TOP);
// Image[] imgTextHealth=new Image[1];
// imgTextHealth=HorseMidlet.getImages("text_health",1);
// g.drawImage(imgTextHealth[0],70,69,g.LEFT|g.TOP);
g.drawImage(imgTextHealth[0],55,69,g.LEFT|g.TOP);
/* g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no
].m_No),140,22,1);
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_HorseAge),142,34,1);
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_HorseEx),140,50,1);
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_HorseEndur),140,64,1);
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_HorseHealth),140,78,1);
*/
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_No),112,22,1);
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_HorseAge),112,34,1);
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_HorseEx),110,50,1);
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_HorseEndur),110,64,1);
g.drawString(java.lang.Integer.toString(myHorseRacing.horses[lot_no].
m_HorseHealth),110,78,1);
//draw lot info box
g.setColor(255,180,0);
// g.fillRect(10,getCanvasHeight()/2+18,getCanvasWidth()/2+20,44);
g.fillRect(0,getCanvasHeight()/2+18,87,44);
g.setColor(0,0,0);
// g.drawRect(10,getCanvasHeight()/2+18,getCanvasWidth()/2+20,44);
g.drawRect(0,getCanvasHeight()/2+18,87,44);
// Image[] imgTextTotalMoney=new Image[1];
// imgTextTotalMoney=HorseMidlet.getImages("text_totalmoney",1);
// g.drawImage(imgTextTotalMoney[0],17,92,g.LEFT|g.TOP);
g.drawImage(imgTextTotalMoney[0],2,92,g.LEFT|g.TOP);
g.setColor(0,0,0);
// g.fillRect(70,92,40,12);
g.fillRect(49,92,35,12);
// g.drawLine(10,105,10+getCanvasWidth()/2+20,105);
g.drawLine(0,105,87,105);
// Image[] imgTextLotNum=new Image[1];