Changeset d6cc453 in mainline for tetris/screen.c


Ignore:
Timestamp:
2006-06-02T19:22:08Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
53daee3
Parents:
e87e18f
Message:

Made tetris compile and somewhat run.
Slightly better console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tetris/screen.c

    re87e18f rd6cc453  
    9898{
    9999
     100        resume_normal();
    100101        send_call(con_phone, CONSOLE_CLEAR, 0);
    101102        curscore = -1;
     
    187188
    188189
    189 #if vax && !__GNUC__
    190 typedef int regcell;    /* pcc is bad at `register char', etc */
    191 #else
    192 typedef cell regcell;
    193 #endif
    194 
    195190/*
    196191 * Update the screen.
     
    200195{
    201196        cell *bp, *sp;
    202         regcell so, cur_so = 0;
     197        cell so, cur_so = 0;
    203198        int i, ccol, j;
    204199        static const struct shape *lastshape;
     
    300295{
    301296       
    302         if (set || CEstr == NULL) {
    303                 int l = strlen(s);
    304 
    305                 moveto(Rows - 2, ((Cols - l) >> 1) - 1);
    306                 if (set)
    307                         putstr(s);
    308                 else
    309                         while (--l >= 0)
    310                                 (void) putchar(' ');
    311         } else {
    312                 moveto(Rows - 2, 0);
    313                 putpad(CEstr);
    314         }
    315 }
     297        int l = strlen(s);
     298       
     299        moveto(Rows - 2, ((Cols - l) >> 1) - 1);
     300        if (set)
     301                putstr(s);
     302        else
     303                while (--l >= 0)
     304                        (void) putchar(' ');
     305}
Note: See TracChangeset for help on using the changeset viewer.