- DrawText(VX + VIDEO_TIME_XPOS, VY + VIDEO_TIME_YPOS,
- int2str(min, 2), FONT_TAPE_RECORDER);
- DrawText(VX + VIDEO_TIME_XPOS + 27, VY + VIDEO_TIME_YPOS,
- int2str(sec, 2), FONT_TAPE_RECORDER);
+ if ((type & DATETIME_DATE) && (state & VIDEO_STATE_DATE_ON))
+ {
+ char s[MAX_DATETIME_STRING_SIZE];
+ int year2 = value / 10000;
+ int year4 = (year2 < 70 ? 2000 + year2 : 1900 + year2);
+ int month_index = (value / 100) % 100;
+ int month = month_index + 1;
+ int day = value % 100;
+
+ strcpy(s, (type & DATETIME_DATE_YYYY ? int2str(year4, 4) :
+ type & DATETIME_DATE_YY ? int2str(year2, 2) :
+ type & DATETIME_DATE_MON ? month_shortnames[month_index] :
+ type & DATETIME_DATE_MM ? int2str(month, 2) :
+ type & DATETIME_DATE_DD ? int2str(day, 2) : ""));
+
+ DrawText(xpos, ypos, s, pos->font);
+ }
+ else if ((type & DATETIME_TIME) && (state & VIDEO_STATE_TIME_ON))
+ {
+ char s[MAX_DATETIME_STRING_SIZE];
+ int hh = (value / 3600) % 100;
+ int min = value / 60;
+ int mm = (value / 60) % 60;
+ int ss = value % 60;
+
+ strcpy(s, (type & DATETIME_TIME_HH ? int2str(hh, 2) :
+ type & DATETIME_TIME_MIN ? int2str(min, 2) :
+ type & DATETIME_TIME_MM ? int2str(mm, 2) :
+ type & DATETIME_TIME_SS ? int2str(ss, 2) : ""));
+
+ DrawText(xpos, ypos, s, pos->font);
+ }
+ else if ((type & DATETIME_FRAME) && (state & VIDEO_STATE_FRAME_ON))
+ {
+ DrawText(xpos, ypos, int2str(value, pos->size), pos->font);
+ }