static void renderCoordinatesAlphabetic (unsigned char *cell, int column, int row) { /* the coordinates are presented as an underlined letter as the Alva DOS TSR */ if (!SCR_COORDINATES_OK(column, row)) { *cell = convertCharacterToDots(textTable, WC_C('z')); } else { const int32_t height = 25; const int32_t frequency = row / height; if (frequency) { const int32_t interval = NSECS_PER_SEC / (frequency * 2); TimeValue time; getMonotonicTime(&time); scheduleUpdateIn("alva status field", (((interval - (time.nanoseconds % interval)) / NSECS_PER_MSEC) + 1)); if (!((time.nanoseconds / interval) % 2)) { *cell = 0; return; } } *cell = convertCharacterToDots(textTable, ((row % height) + WC_C('a'))) | ((column / textCount) << 6); } }
static void renderStatusField_time (unsigned char *cells) { TimeValue value; TimeComponents components; getCurrentTime(&value); scheduleUpdateIn("time status field", millisecondsTillNextMinute(&value)); expandTimeValue(&value, &components); renderNumberUpper(cells, components.hour); renderNumberLower(cells, components.minute); }
void mainScreenUpdated (void) { if (isMainScreen()) { scheduleUpdateIn("main screen updated", SCREEN_UPDATE_SCHEDULE_DELAY); } }