Commits

Trammell Hudson committed 8e5f008

Square layout, one less row

  • Participants
  • Parent commits 98dc454

Comments (0)

Files changed (2)

File words/src/Makefile

 SRCS += words.c
 
 FONTS := \
-	fonts/Courier.ttf:19 \
-	fonts/Courier-Bold.ttf:19 \
+	fonts/Courier.ttf:20 \
+	fonts/Courier-Bold.ttf:20 \
 
 include ../../Makefile.pebble

File words/src/words.c

 
 #define ROWS 10
 #define COLS 11
-#define FONT_H 16
-#define FONT_W 11
-#define FONT_ON		RESOURCE_ID_FONT_COURIER_BOLD_19
-#define FONT_OFF	RESOURCE_ID_FONT_COURIER_19
+#define FONT_H 18
+#define FONT_W 12
+#define FONT_ON		RESOURCE_ID_FONT_COURIER_BOLD_20
+#define FONT_OFF	RESOURCE_ID_FONT_COURIER_20
 
 
 typedef struct
 #define LAYER_A		22
 #define LAYER_FILLER	23
 
+/** Square:
+  012345678901
+0 ITxISxpebble
+1 AxQUARTERTEN
+2 xTWENTYxFIVE
+3 HALFxPASTTOx
+4 SEVENFIVETWO
+5 ONESIXELEVEN
+6 TENxNINEFOUR
+7 EIGHTTWELVEx
+8 THREExOCLOCK
+  012345678901
+*/
+
 static const word_t words[] = {
 	// Hours 1-12
 	[1] = {  5, 0, "ONE", "one" },
-	[2] = {  6, 8, "TWO", "two" },
-	[3] = {  5, 6, "THREE", "three" },
-	[4] = {  6, 0, "FOUR", "four" },
-	[5] = {  6, 4, "FIVE", "five" }, // hour
+	[2] = {  4, 9, "TWO", "two" },
+	[3] = {  8, 0, "THREE", "three" },
+	[4] = {  6, 8, "FOUR", "four" },
+	[5] = {  4, 5, "FIVE", "five" }, // hour
 	[6] = {  5, 3, "SIX", "six" },
-	[7] = {  8, 0, "SEVEN", "seven" },
+	[7] = {  4, 0, "SEVEN", "seven" },
 	[8] = {  7, 0, "EIGHT", "eight" },
-	[9] = {  4, 7, "NINE", "nine" },
-	[10] = {  9, 0, "TEN", "ten" }, // hour
-	[11] = {  7, 5, "ELEVEN", "eleven" },
-	[12] = {  8, 5, "TWELVE", "twelve" },
+	[9] = {  6, 4, "NINE", "nine" },
+	[10] = {  6, 0, "TEN", "ten" }, // hour
+	[11] = {  5, 6, "ELEVEN", "eleven" },
+	[12] = {  7, 5, "TWELVE", "twelve" },
 
 	// Minutes 13-
-	[LAYER_FIVE]	= {  2, 6, "FIVE", "five" }, // minute
-	[LAYER_TEN]	= {  3, 5, "TEN", "ten" }, // minute
+	[LAYER_FIVE]	= {  2, 8, "FIVE", "five" }, // minute
+	[LAYER_TEN]	= {  1, 9, "TEN", "ten" }, // minute
 	[LAYER_A]	= {  1, 0, "A", "a" },
 	[LAYER_QUARTER]	= {  1, 2, "QUARTER", "quarter" },
 	[LAYER_HALF]	= {  3, 0, "HALF", "half" },
-	[LAYER_TWENTY]	= {  2, 0, "TWENTY", "twenty" },
+	[LAYER_TWENTY]	= {  2, 1, "TWENTY", "twenty" },
 
 	// Relative
 	[LAYER_IT] = {  0, 0, "IT", "it" },
-	[LAYER_PAST]	= {  4, 0, "PAST", "past" },
+	[LAYER_PAST]	= {  3, 5, "PAST", "past" },
 	[LAYER_TO]	= {  3, 9, "TO", "to", },
-	[LAYER_OCLOCK]	= {  9, 5, "OCLOCK", "oclock" },
+	[LAYER_OCLOCK]	= {  8, 6, "OCLOCK", "oclock" },
 	[LAYER_IS]	= {  0, 3, "IS", "is" },
 
 	// Fillers
 	[LAYER_FILLER] =
 	{  0, 2, "a", "a" },
-	{  0, 5, "CDTIME", "pebble" },
-	{  1, 1, "T", "t" },
-	{  1, 9, "TH", "th" },
-	{  2, 10, "X", "x" },
+	{  0, 5, "xpebble", "xpebble" },
+	{  1, 1, "t", "t" },
+	{  2, 0, "x", "x" },
+	{  2, 7, "n", "n" },
 	{  3, 4, "B", "b" },
-	{  3, 8, "F", "f" },
-	{  4, 4, "ERU", "eru" },
-	{  9, 3, "SE", "se" },
+	{  3, 11, "F", "f" },
+	{  6, 3, "E", "e" },
+	{  7, 11, "S", "s" },
+	{  8, 5, "x", "x" },
 };
 
 #define WORD_COUNT ((sizeof(words) / sizeof(*words)))
         GContext * ctx
 )
 {
-	const int w = 5;
+	const int w = 4;
 	GRect r = GRect(0, 0, w, w);
 
 	if (minute_num == 0)
 	const word_t * const w = &words[which];
 
 	GRect frame = GRect(
-		w->col*FONT_W + 12,
-		w->row*FONT_H,
+		w->col*FONT_W,
+		w->row*FONT_H - 4,
 		strlen(w->text_on)*(FONT_W+4),
 		FONT_H+5
 	);