Changeset 1126


Ignore:
Timestamp:
Sep 28, 2006, 10:37:09 AM (14 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Displays current completed lines count
Location:
cacatris/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cacatris/trunk/src/cacatris.h

    r1125 r1126  
    6060
    6161
    62 void infos_populate(cucul_canvas_t *, unsigned int score, unsigned char level);
     62void infos_populate(cucul_canvas_t *, unsigned int, unsigned char , unsigned char);
    6363void playfield_draw(cucul_canvas_t *);
    6464void put_piece(unsigned int, unsigned int, unsigned int, unsigned int);
  • cacatris/trunk/src/main.c

    r1125 r1126  
    131131
    132132        /* Populate info canvas */
    133         infos_populate(infos, score, level);
     133        infos_populate(infos, score, level, total_lines);
    134134        /* Draw everything on playfield */
    135135        put_piece(current_piece, x ,y, rotation);
     
    166166                level++;
    167167                total_lines = 0;
    168                 speed+=2;
     168                speed+=4;
    169169                memset(playfield, 0, FIELD_WIDTH*FIELD_HEIGHT);
    170170            }
     
    185185
    186186
    187 void infos_populate(cucul_canvas_t *inf, unsigned int score, unsigned char level)
     187void infos_populate(cucul_canvas_t *inf, unsigned int score,
     188                    unsigned char level, unsigned char total)
    188189{
    189190    unsigned int i;
    190     char scoreline[1024];
    191     char levelline[1024];
     191    char scoreline[256];
     192    char levelline[256];
     193    char totalline[256];
    192194
    193195    sprintf(scoreline, " Score    :   %05d ", score);
    194196    sprintf(levelline, " Level    :   %02d    ", level);
     197    sprintf(totalline, " Lines    :   %02d    ", total);
    195198
    196199    cucul_set_color(inf, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
     
    202205    cucul_putstr(inf, 0, 5, levelline);
    203206    cucul_putstr(inf, 0, 6, scoreline);
    204     cucul_putstr(inf, 0, 7, " Time     :   XX:XX ");
    205 
    206     for(i = 7; i < cucul_get_canvas_height(inf); i++)
     207    cucul_putstr(inf, 0, 7, totalline);
     208    cucul_putstr(inf, 0, 8, " Time     :   XX:XX ");
     209
     210    for(i = 8; i < cucul_get_canvas_height(inf); i++)
    207211    {
    208212        cucul_putstr(inf, 0, i,"                     ");
Note: See TracChangeset for help on using the changeset viewer.