packed screen struct to 2 bytes, saved 2 kB of RAM

pull/30/head
Ondřej Hruška 8 years ago
parent 1d52cd551a
commit bbb56541f8
  1. 10
      user/screen.c

@ -10,12 +10,12 @@
#define COLOR_MAX 15
/**
* Screen cell data type
* Screen cell data type (16 bits)
*/
typedef struct {
char c;
Color fg;
Color bg;
typedef struct __attribute__((packed)){
char c : 8;
Color fg : 4;
Color bg : 4;
} Cell;
/**

Loading…
Cancel
Save