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

This commit is contained in:
2017-01-28 01:17:13 +01:00
parent 1d52cd551a
commit bbb56541f8
+5 -5
View File
@@ -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;
/**