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 #define COLOR_MAX 15
/** /**
* Screen cell data type * Screen cell data type (16 bits)
*/ */
typedef struct { typedef struct __attribute__((packed)){
char c; char c : 8;
Color fg; Color fg : 4;
Color bg; Color bg : 4;
} Cell; } Cell;
/** /**

Loading…
Cancel
Save