Beispiel #1
0
//&---------------------------------------------------------------------*
//&      Method  addLineCompleted
//&---------------------------------------------------------------------*
//
//----------------------------------------------------------------------*
void Points::addLinesCompleted(const int id_lines) {
    int mult = 0;
    switch (id_lines) {
        case 1:
            mult = SCORE_MULTIPLIER_1LINE;
            break;
        case 2:
            mult = SCORE_MULTIPLIER_2LINES;
            break;
        case 3:
            mult = SCORE_MULTIPLIER_3LINES;
            break;
        case 4:
            mult = SCORE_MULTIPLIER_4LINES;
            break;
        default:
            break;
    }
    m_points += (m_level + 1) * mult;
    m_lines += id_lines;
    m_lineCountForLevel += id_lines;
    updateTopScore();
    updateTopLines();
    updateLevel();
}
Beispiel #2
0
void recordAnimation() {
  uchar c, i;
  struct HiScore* p;
  struct HiScore tmp;

  prepareRecordScreen();

  if(score < hiScores[8].score) {
    return; 
  }

  hiScores[8].score = score;

  memset(hiScores[8].name, 0, 6);
  i = 0;

  drawRecordScreen(8);

  while(1) {
    c = getch_();
    if(c==13) break;  
    if(c==127) {
      if(i==0) continue;
      --i;   
      hiScores[8].name[i] = 0;
      drawRecordLastLine();
      continue;
    }
    if(c>=32 && c<127) {
      if(i==6) continue;
      hiScores[8].name[i] = c;
      hiScores[8].name[i+1] = 0;
      ++i;   
      drawRecordLastLine();
    }
  }
  c = 8;
  p = hiScores+8;
  while(1) {
    if(p->score >= p[-1].score) break;    
    p--;
    memcpy(&tmp, p+1, sizeof(tmp));
    memcpy(p+1, p, sizeof(tmp));
    memcpy(p, &tmp, sizeof(tmp));
    c--;    
    drawRecordScreen(c);
    delay(RECORD_SPEED);
    if(c==0) {
      updateTopScore();      
      break;
    }
  }

  getch_();
}
Beispiel #3
0
void initGameScreen() {
  register uchar y, x;  
  apogeyScreen3c();
  fillScreen(gameScreen);
//  apogeyScreen3c2();

  for(y=0; y<9; y++)
    for(x=0; x<9; x++)
      drawSprite(x, y, 0, emptySprite);
      
  updateTopScore();
}               	
Beispiel #4
0
void initGameScreen2() {
  uchar *s, i, x, y;

  SET_COLOR(COLOR_BLACK);                                                    
  unmlz((uchar*)0x9000, imgScreen);
  unmlz((uchar*)0x4800, imgScreen_colors);
  colorizer_rand();
    
  SET_COLOR(COLOR_GREEN);
  print(56,19,8,"ВЫ");
  
  updateTopScore();
  playerSpriteTop = -1;
  drawScore1();
//  redrawNewBalls2();
  if(!showPath ) drawOnOff(0, 0);
  if(!playSound) drawOnOff(1, 0);
  if(!showHelp ) drawOnOff(2, 0);
//  drawCells();
}
Beispiel #5
0
//&---------------------------------------------------------------------*
//&      Method  addSlowDrop
//&---------------------------------------------------------------------*
//
//----------------------------------------------------------------------*
void Points::addSlowDrop() {
    m_points += 1;// * (m_level + 1);
    updateTopScore();
}
Beispiel #6
0
//&---------------------------------------------------------------------*
//&      Method  addFastDrop
//&---------------------------------------------------------------------*
//
//----------------------------------------------------------------------*
void Points::addFastDrop() {
    m_points += 3;// * (m_level + 1);
    updateTopScore();
}
Beispiel #7
0
//&---------------------------------------------------------------------*
//&      Method  addBlockPlaced
//&---------------------------------------------------------------------*
//
//----------------------------------------------------------------------*
void Points::addBlockPlaced() {
    m_points += BLOCK_PLACED;// * (m_level + 1);
    m_blocks++;
    updateTopScore();
}