Subversion Repositories freemyipod

Rev

Rev 7 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7 Rev 14
Line 21... Line 21...
21
//
21
//
22
 
22
 
23
 
23
 
24
#include "global.h"
24
#include "global.h"
25
#include "lcdconsole.h"
25
#include "lcdconsole.h"
-
 
26
#include "drawing.h"
26
#include "util.h"
27
#include "util.h"
27
 
28
 
28
 
29
 
29
#define OFFSETX LCDCONSOLE_OFFSETX
30
#define OFFSETX LCDCONSOLE_OFFSETX
30
#define OFFSETY LCDCONSOLE_OFFSETY
31
#define OFFSETY LCDCONSOLE_OFFSETY
Line 68... Line 69...
68
    current_row++;
69
    current_row++;
69
  }
70
  }
70
  if (current_row >= LCDCONSOLE_ROWS)
71
  if (current_row >= LCDCONSOLE_ROWS)
71
  {
72
  {
72
    int offset = current_row - LCDCONSOLE_ROWS + 1;
73
    int offset = current_row - LCDCONSOLE_ROWS + 1;
73
    memcpy(framebuf, &framebuf[ROWBYTES * offset], ROWBYTES * offset);
74
    memcpy(&framebuf[LINEBYTES * OFFSETY], &framebuf[LINEBYTES * OFFSETY + ROWBYTES * offset],
-
 
75
           ROWBYTES * (LCDCONSOLE_ROWS - offset));
74
    memset(&framebuf[sizeof(framebuf) - ROWBYTES * offset],
76
    memset(&framebuf[LINEBYTES * OFFSETY + ROWBYTES * (LCDCONSOLE_ROWS - offset)],
75
           -1, ROWBYTES * offset);
77
           -1, ROWBYTES * offset);
-
 
78
    current_row = LCDCONSOLE_ROWS - 1;
76
  }
79
  }
77
  renderchar(&framebuf[OFFSETBYTES + ROWBYTES * current_row
80
  renderchar(&framebuf[OFFSETBYTES + ROWBYTES * current_row + COLBYTES * current_col],
78
                     + COLBYTES * current_col],
-
 
79
             fgcolor, bgcolor, string, LINEBYTES);
81
             fgcolor, bgcolor, string, LINEBYTES);
80
}
82
}
81
 
83
 
82
void lcdconsole_puts(const char* string, int fgcolor, int bgcolor)
84
void lcdconsole_puts(const char* string, int fgcolor, int bgcolor)
83
{
85
{