diff options
Diffstat (limited to 'src/pong/make_number.5c')
-rw-r--r-- | src/pong/make_number.5c | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/src/pong/make_number.5c b/src/pong/make_number.5c new file mode 100644 index 00000000..3b1970cc --- /dev/null +++ b/src/pong/make_number.5c @@ -0,0 +1,104 @@ +#!/usr/bin/nickle + +int[10,6,4] numbers = { + { +{ 1, 1, 1, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 1, 1, 1, }, + }, + { +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, + }, + { +{ 1, 1, 1, 1, }, +{ 0, 0, 0, 1, }, +{ 1, 1, 1, 1, }, +{ 1, 0, 0, 0, }, +{ 1, 0, 0, 0, }, +{ 1, 1, 1, 1, }, + }, + { +{ 1, 1, 1, 1, }, +{ 0, 0, 0, 1, }, +{ 1, 1, 1, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 1, 1, 1, 1, }, + }, + { +{ 1, 0, 0, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 1, 1, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, + }, + { +{ 1, 1, 1, 1, }, +{ 1, 0, 0, 0, }, +{ 1, 1, 1, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 1, 1, 1, 1, }, + }, + { +{ 1, 0, 0, 0, }, +{ 1, 0, 0, 0, }, +{ 1, 1, 1, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 1, 1, 1, }, + }, + { +{ 1, 1, 1, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, + }, + { +{ 1, 1, 1, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 1, 1, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 1, 1, 1, }, + }, + { +{ 1, 1, 1, 1, }, +{ 1, 0, 0, 1, }, +{ 1, 1, 1, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, +{ 0, 0, 0, 1, }, + }, + }; + +void +make_number(int i) { + + printf("/* %d */\n", i); + for (int row = 0; row < 6; row++) { + for (int copy = 0; copy < 4; copy++) { + int val = 0; + for (int col = 0; col < 4; col ++) { + if(numbers[i,row,col] == 1) + val |= (0x0f << (col * 4)); + } + printf("0x%04x,\n", val); + } + } + printf("\n"); +} + +for (int i = 0; i < 10; i++) + make_number(i); |