Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.08 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. #include <conio.h>
  4. #include <vector>
  5. #include <ctime>
  6. #include <string>
  7.  
  8. using namespace std;
  9. int circle[60][2] = {{11,0},{12,0},{13,0},{14,1},{15,1},{16,2},{17,2},{18,3},{18,4},{19,5},{20,6},{20,7},{21,8},{21,9},{21,10},{21,11},{21,12},{21,13},{20,14},{20,15},{19,16},{19,17},{18,18},{17,19},{16,19},{15,20},{14,20},{13,21},{12,21},{11,21},{10,21},{9,21},{8,21},{7,20},{6,20},{5,19},{4,18},{3,18},{2,17},{2,16},{1,15},{1,14},{0,13},{0,12},{0,11},{0,10},{0,9},{0,8},{1,7},{1,6},{2,5},{2,4},{3,3},{4,2},{5,2},{6,1},{7,1},{8,0},{9,0},{10,0}};
  10. int seconds[60][25][2] =
  11. {
  12. {
  13. {10,10},
  14. {10,9},
  15. {10,8},
  16. {10,7},
  17. {10,6},
  18. {10,5},
  19. {10,4},
  20. {10,3},
  21. {10,2}
  22. },
  23. {
  24. {11,10},
  25. {11,9},
  26. {11,8},
  27. {11,7},
  28. {11,6},
  29. {11,5},
  30. {11,4},
  31. {11,3},
  32. {11,2}
  33. },
  34. {
  35. {11,10},
  36. {11,9},
  37. {11,8},
  38. {11,7},
  39. {11,6},
  40. {12,5},
  41. {12,4},
  42. {12,3},
  43. {12,2},
  44. {12,1}
  45. },
  46. {
  47. {11,10},
  48. {11,9},
  49. {11,8},
  50. {12,7},
  51. {12,6},
  52. {12,5},
  53. {12,4},
  54. {13,3},
  55. {13,2},
  56. {13,1}
  57. },
  58. {
  59. {11,10},
  60. {11,9},
  61. {12,8},
  62. {12,7},
  63. {13,6},
  64. {13,5},
  65. {13,4},
  66. {14,3},
  67. {14,2}
  68. },
  69. {
  70. {11,10},
  71. {12,9},
  72. {12,8},
  73. {13,7},
  74. {13,6},
  75. {14,5},
  76. {14,4},
  77. {15,3}
  78. },
  79. {
  80. {11,10},
  81. {12,9},
  82. {12,8},
  83. {13,7},
  84. {14,6},
  85. {15,5},
  86. {15,4}
  87. },
  88. {
  89. {11,10},
  90. {12,9},
  91. {13,8},
  92. {14,7},
  93. {14,6},
  94. {15,5},
  95. {16,4},
  96. {17,3}
  97. },
  98. {
  99. {11,10},
  100. {12,9},
  101. {13,8},
  102. {14,7},
  103. {15,6},
  104. {16,5},
  105. {17,4}
  106. },
  107. {
  108. {11,10},
  109. {12,9},
  110. {13,9},
  111. {14,8},
  112. {15,7},
  113. {16,6},
  114. {17,6},
  115. {18,5}
  116. },
  117. {
  118. {11,10},
  119. {12,9},
  120. {13,9},
  121. {14,8},
  122. {15,8},
  123. {16,7},
  124. {17,7}
  125. },
  126. {
  127. {11,10},
  128. {12,10},
  129. {13,9},
  130. {14,9},
  131. {15,8},
  132. {16,8},
  133. {17,7},
  134. {18,7},
  135. {19,6}
  136. },
  137. {
  138. {11,10},
  139. {12,10},
  140. {13,9},
  141. {14,9},
  142. {15,9},
  143. {16,8},
  144. {17,8},
  145. {18,7},
  146. {19,7}
  147. },
  148. {
  149. {11,10},
  150. {12,10},
  151. {13,10},
  152. {14,9},
  153. {15,9},
  154. {16,9},
  155. {17,9},
  156. {18,8},
  157. {19,8},
  158. {20,8}
  159. },
  160. {
  161. {11,10},
  162. {12,10},
  163. {13,10},
  164. {14,10},
  165. {15,10},
  166. {16,9},
  167. {17,9},
  168. {18,9},
  169. {19,9},
  170. {20,9}
  171. },
  172. {
  173. {11,10},
  174. {12,10},
  175. {13,10},
  176. {14,10},
  177. {15,10},
  178. {16,10},
  179. {17,10},
  180. {18,10},
  181. {19,10}
  182. },
  183. {
  184. {11,11},
  185. {12,11},
  186. {13,11},
  187. {14,11},
  188. {15,11},
  189. {16,11},
  190. {17,11},
  191. {18,11},
  192. {19,11},
  193. {20,11}
  194. },
  195. {
  196. {11,11},
  197. {12,11},
  198. {13,11},
  199. {14,11},
  200. {15,11},
  201. {16,12},
  202. {17,12},
  203. {18,12},
  204. {19,12},
  205. {20,12}
  206. },
  207. {
  208. {11,11},
  209. {12,11},
  210. {13,11},
  211. {14,12},
  212. {15,12},
  213. {16,12},
  214. {17,12},
  215. {18,13},
  216. {19,13},
  217. {20,13}
  218. },
  219. {
  220. {11,11},
  221. {12,11},
  222. {13,12},
  223. {14,12},
  224. {15,12},
  225. {16,13},
  226. {17,13},
  227. {18,14},
  228. {19,14}
  229. },
  230. {
  231. {11,11},
  232. {12,11},
  233. {13,12},
  234. {14,12},
  235. {15,13},
  236. {16,13},
  237. {17,14},
  238. {18,14},
  239. {19,15}
  240. },
  241. {
  242. {11,11},
  243. {12,12},
  244. {13,12},
  245. {14,13},
  246. {15,14},
  247. {16,15},
  248. {17,15},
  249. {18,16}
  250. },
  251. {
  252. {11,11},
  253. {12,12},
  254. {13,13},
  255. {14,14},
  256. {15,14},
  257. {16,15},
  258. {17,16},
  259. {18,17}
  260. },
  261. {
  262. {11,11},
  263. {12,12},
  264. {13,13},
  265. {14,14},
  266. {15,15},
  267. {16,16},
  268. {17,17}
  269. },
  270. {
  271. {11,11},
  272. {12,12},
  273. {13,13},
  274. {14,14},
  275. {14,15},
  276. {15,16},
  277. {16,17},
  278. {17,18}
  279. },
  280. {
  281. {11,11},
  282. {12,12},
  283. {12,13},
  284. {13,14},
  285. {14,15},
  286. {15,16},
  287. {15,17},
  288. {16,18}
  289. },
  290. {
  291. {11,11},
  292. {11,12},
  293. {12,13},
  294. {12,14},
  295. {13,15},
  296. {13,16},
  297. {14,17},
  298. {14,18},
  299. {15,19}
  300. },
  301. {
  302. {11,11},
  303. {11,12},
  304. {12,13},
  305. {12,14},
  306. {12,15},
  307. {13,16},
  308. {13,17},
  309. {14,18},
  310. {14,19}
  311. },
  312. {
  313. {11,11},
  314. {11,12},
  315. {11,13},
  316. {12,14},
  317. {12,15},
  318. {12,16},
  319. {12,17},
  320. {13,18},
  321. {13,19},
  322. {13,20}
  323. },
  324. {
  325. {11,11},
  326. {11,12},
  327. {11,13},
  328. {11,14},
  329. {11,15},
  330. {12,16},
  331. {12,17},
  332. {12,18},
  333. {12,19},
  334. {12,20}
  335. },
  336. {
  337. {11,11},
  338. {11,12},
  339. {11,13},
  340. {11,14},
  341. {11,15},
  342. {11,16},
  343. {11,17},
  344. {11,18},
  345. {11,19}
  346. },
  347. {
  348. {10,11},
  349. {10,12},
  350. {10,13},
  351. {10,14},
  352. {10,15},
  353. {10,16},
  354. {10,17},
  355. {10,18},
  356. {10,19}
  357. },
  358. {
  359. {10,11},
  360. {10,12},
  361. {10,13},
  362. {10,14},
  363. {10,15},
  364. {9,16},
  365. {9,17},
  366. {9,18},
  367. {9,19},
  368. {9,20}
  369. },
  370. {
  371. {10,11},
  372. {10,12},
  373. {10,13},
  374. {9,14},
  375. {9,15},
  376. {9,16},
  377. {9,17},
  378. {8,18},
  379. {8,19},
  380. {8,20}
  381. },
  382. {
  383. {10,11},
  384. {10,12},
  385. {9,13},
  386. {9,14},
  387. {9,15},
  388. {8,15},
  389. {8,16},
  390. {8,17},
  391. {7,18},
  392. {7,19}
  393. },
  394. {
  395. {10,11},
  396. {10,12},
  397. {9,13},
  398. {9,14},
  399. {9,15},
  400. {8,15},
  401. {8,16},
  402. {7,16},
  403. {7,17},
  404. {6,19}
  405. },
  406. {
  407. {10,11},
  408. {10,12},
  409. {9,13},
  410. {9,14},
  411. {8,14},
  412. {8,15},
  413. {7,16},
  414. {7,17}
  415. },
  416. {
  417. {10,11},
  418. {10,12},
  419. {9,12},
  420. {9,13},
  421. {8,13},
  422. {8,14},
  423. {7,15},
  424. {7,16},
  425. {6,16},
  426. {6,17},
  427. {5,17},
  428. {5,18}
  429. },
  430. {
  431. {10,11},
  432. {9,12},
  433. {8,13},
  434. {7,14},
  435. {6,15},
  436. {5,16},
  437. {4,17}
  438. },
  439. {
  440. {10,11},
  441. {9,12},
  442. {8,13},
  443. {7,13},
  444. {7,14},
  445. {6,14},
  446. {6,15},
  447. {5,15},
  448. {4,16},
  449. {3,17}
  450. },
  451. {
  452. {10,11},
  453. {9,12},
  454. {8,12},
  455. {8,13},
  456. {7,13},
  457. {6,14},
  458. {5,14},
  459. {5,15},
  460. {4,16},
  461. {3,16}
  462. },
  463. {
  464. {10,11},
  465. {9,11},
  466. {7,12},
  467. {8,12},
  468. {6,13},
  469. {7,13},
  470. {4,14},
  471. {5,14},
  472. {2,15}
  473. },
  474. {
  475. {10,11},
  476. {9,11},
  477. {6,12},
  478. {7,12},
  479. {8,12},
  480. {6,13},
  481. {5,13},
  482. {4,13},
  483. {3,14},
  484. {2,14}
  485. },
  486. {
  487. {10,11},
  488. {9,11},
  489. {8,11},
  490. {6,12},
  491. {7,12},
  492. {5,12},
  493. {4,12},
  494. {3,13},
  495. {2,13},
  496. {1,13}
  497. },
  498. {
  499. {10,11},
  500. {9,11},
  501. {8,11},
  502. {7,11},
  503. {6,11},
  504. {5,12},
  505. {4,12},
  506. {3,12},
  507. {2,12},
  508. {1,12}
  509. },
  510. {
  511. {10,11},
  512. {9,11},
  513. {8,11},
  514. {7,11},
  515. {6,11},
  516. {5,11},
  517. {4,11},
  518. {3,11},
  519. {2,11},
  520. {1,11}
  521. },
  522. {
  523. {10,10},
  524. {9,10},
  525. {8,10},
  526. {7,10},
  527. {6,10},
  528. {5,10},
  529. {4,10},
  530. {3,10},
  531. {2,10}
  532. },
  533. {
  534. {10,10},
  535. {9,10},
  536. {8,10},
  537. {7,10},
  538. {6,10},
  539. {5,9},
  540. {4,9},
  541. {3,9},
  542. {2,9},
  543. {1,9}
  544. },
  545. {
  546. {10,10},
  547. {9,10},
  548. {8,10},
  549. {7,9},
  550. {6,9},
  551. {5,9},
  552. {4,9},
  553. {3,8},
  554. {2,8},
  555. {1,8}
  556. },
  557. {
  558. {10,10},
  559. {9,10},
  560. {8,9},
  561. {7,9},
  562. {6,8},
  563. {5,8},
  564. {4,8},
  565. {3,7},
  566. {2,7}
  567. },
  568. {
  569. {10,10},
  570. {9,9},
  571. {8,9},
  572. {7,8},
  573. {6,8},
  574. {5,7},
  575. {4,7},
  576. {2,6}
  577. },
  578. {
  579. {10,10},
  580. {9,9},
  581. {8,9},
  582. {7,8},
  583. {6,7},
  584. {5,6},
  585. {4,6},
  586. {3,5}
  587. },
  588. {
  589. {10,10},
  590. {9,9},
  591. {8,8},
  592. {7,7},
  593. {6,7},
  594. {5,6},
  595. {4,5},
  596. {3,4}
  597. },
  598. {
  599. {10,10},
  600. {9,9},
  601. {8,8},
  602. {7,7},
  603. {6,6},
  604. {5,5}
  605. },
  606. {
  607. {10,10},
  608. {9,9},
  609. {8,8},
  610. {7,7},
  611. {7,6},
  612. {6,5},
  613. {5,4},
  614. {4,3}
  615. },
  616. {
  617. {10,10},
  618. {9,9},
  619. {9,8},
  620. {8,7},
  621. {7,6},
  622. {6,5},
  623. {6,4}
  624. },
  625. {
  626. {10,10},
  627. {9,9},
  628. {9,8},
  629. {8,7},
  630. {8,6},
  631. {7,5},
  632. {7,4},
  633. {6,3},
  634. {6,2}
  635. },
  636. {
  637. {10,10},
  638. {10,9},
  639. {9,8},
  640. {9,7},
  641. {8,6},
  642. {8,5},
  643. {8,4},
  644. {7,3},
  645. {7,2}
  646. },
  647. {
  648. {10,10},
  649. {10,9},
  650. {10,8},
  651. {9,7},
  652. {9,6},
  653. {9,5},
  654. {9,4},
  655. {8,3},
  656. {8,2},
  657. {8,1}
  658. },
  659. {
  660. {10,10},
  661. {10,9},
  662. {10,8},
  663. {10,7},
  664. {10,6},
  665. {9,5},
  666. {9,4},
  667. {9,3},
  668. {9,2},
  669. {9,1}
  670. }
  671. };
  672. int hours[12][5][2] =
  673. {
  674. {
  675. {11,10},
  676. {11,9},
  677. {11,8},
  678. {11,7},
  679. {11,6}
  680. },
  681. {
  682. {11,10},
  683. {12,9},
  684. {12,8},
  685. {13,7},
  686. {13,6}
  687. },
  688. {
  689. {11,10},
  690. {12,9},
  691. {13,9},
  692. {14,8},
  693. {15,8}
  694. },
  695. {
  696. {11,10},
  697. {12,10},
  698. {13,10},
  699. {14,10},
  700. {15,10}
  701. },
  702. {
  703. {11,11},
  704. {12,12},
  705. {13,12},
  706. {14,13},
  707. {15,13}
  708. },
  709. {
  710. {11,11},
  711. {12,12},
  712. {12,13},
  713. {13,14},
  714. {13,15}
  715. },
  716. {
  717. {11,11},
  718. {11,12},
  719. {11,13},
  720. {11,14},
  721. {11,15}
  722. },
  723. {
  724. {10,11},
  725. {9,12},
  726. {9,13},
  727. {8,14},
  728. {8,15}
  729. },
  730. {
  731. {10,11},
  732. {9,12},
  733. {8,12},
  734. {7,13},
  735. {6,13}
  736. },
  737. {
  738. {10,10},
  739. {9,10},
  740. {8,10},
  741. {7,10},
  742. {6,10}
  743. },
  744. {
  745. {10,10},
  746. {9,9},
  747. {8,9},
  748. {7,8},
  749. {6,8}
  750. },
  751. {
  752. {10,10},
  753. {9,9},
  754. {9,8},
  755. {8,7},
  756. {7,6}
  757. }
  758. };
  759. char digital[13][5][18]=
  760. {
  761. {
  762. {" __ "},
  763. {" / \\ "},
  764. {"| |"},
  765. {"| |"},
  766. {" \\__/ "}
  767. },
  768. {
  769. {" , "},
  770. {" /| "},
  771. {" | "},
  772. {" | "},
  773. {" | "}
  774. },
  775. {
  776. {" __ "},
  777. {" / ) "},
  778. {" / "},
  779. {" / "},
  780. {" /___ "}
  781. },
  782. {
  783. {" ___ "},
  784. {" / \\"},
  785. {" __/"},
  786. {" \\"},
  787. {" \\___/"}
  788. },
  789. {
  790. {" "},
  791. {" | | "},
  792. {" |__|_"},
  793. {" | "},
  794. {" | "}
  795. },
  796. {
  797. {" ____"},
  798. {" | "},
  799. {" |___ "},
  800. {" \\"},
  801. {" \\___/"}
  802. },
  803. {
  804. {" __ "},
  805. {" / "},
  806. {" | __ "},
  807. {" |/ \\"},
  808. {" \\__/"}
  809. },
  810. {
  811. {" _____"},
  812. {" /"},
  813. {" / "},
  814. {" / "},
  815. {" / "}
  816. },
  817. {
  818. {" __ "},
  819. {" / \\ "},
  820. {" \\__/ "},
  821. {" / \\ "},
  822. {" \\__/ "}
  823. },
  824. {
  825. {" __ "},
  826. {" / | "},
  827. {" \\_/| "},
  828. {" | "},
  829. {" | "}
  830. },
  831. {
  832. {" "},
  833. {" _ "},
  834. {"(_)"},
  835. {" _ "},
  836. {"(_)"}
  837. },
  838. {
  839. {" _ __ __ "},
  840. {" / \\ | \\/ |"},
  841. {" / _ \\ | |\\/| |"},
  842. {" / ___ \\ | | | |"},
  843. {"/_/ \\_\\|_| |_|"}
  844. },
  845. {
  846. {" ____ __ __ "},
  847. {" | _ \\ | \\/ |"},
  848. {" | |_) | | |\\/| |"},
  849. {" | __/ | | | |"},
  850. {" |_| |_| |_|"}
  851. }
  852. };
  853.  
  854. void fontsize(int,int);
  855. void gotoxy(int x, int y)
  856. {
  857. COORD coord;
  858. coord.X = x;
  859. coord.Y = y;
  860. SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
  861. }
  862.  
  863. void rendercicle()
  864. {
  865. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11);
  866. for(int x = 0; x < 60; x++)
  867. {
  868. gotoxy(((circle[x][0]*2)+22),(circle[x][1]+2));
  869. cout << "\xb0\xb0";
  870. }
  871. }
  872.  
  873. void renderdigitalss(int ss)
  874. {
  875. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
  876. if(ss < 10)
  877. {
  878. for(int x = 0; x<5;x++)
  879. {
  880. gotoxy(41,25+x);
  881. for(int y = 0; digital[0][x][y] != '\0';y++)
  882. {
  883. cout<<digital[0][x][y];
  884. }
  885. cout<<" ";
  886. for(int y = 0; digital[ss][x][y] != '\0';y++)
  887. {
  888. cout<<digital[ss][x][y];
  889. }
  890. }
  891. }
  892. else
  893. {
  894. for(int x = 0; x<5;x++)
  895. {
  896. gotoxy(41,25+x);
  897. for(int y = 0; digital[(ss/10)%10][x][y] != '\0';y++)
  898. {
  899. cout<<digital[(ss/10)%10][x][y];
  900. }
  901. cout<<" ";
  902. for(int y = 0; digital[ss%10][x][y] != '\0';y++)
  903. {
  904. cout<<digital[ss%10][x][y];
  905. }
  906. }
  907.  
  908. }
  909. }
  910.  
  911. void renderdigitalmm(int mm)
  912. {
  913. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
  914. if(mm < 10)
  915. {
  916. for(int x = 0; x<5;x++)
  917. {
  918. gotoxy(21,25+x);
  919. for(int y = 0; digital[0][x][y] != '\0';y++)
  920. {
  921. cout<<digital[0][x][y];
  922. }
  923. cout<<" ";
  924. for(int y = 0; digital[mm][x][y] != '\0';y++)
  925. {
  926. cout<<digital[mm][x][y];
  927. }
  928. }
  929. }
  930. else
  931. {
  932. for(int x = 0; x<5;x++)
  933. {
  934. gotoxy(21,25+x);
  935. for(int y = 0; digital[(mm/10)%10][x][y] != '\0';y++)
  936. {
  937. cout<<digital[(mm/10)%10][x][y];
  938. }
  939. cout<<" ";
  940. for(int y = 0; digital[mm%10][x][y] != '\0';y++)
  941. {
  942. cout<<digital[mm%10][x][y];
  943. }
  944. }
  945.  
  946. }
  947. }
  948.  
  949. void renderdigitalhh(int hh)
  950. {
  951. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13);
  952. if(hh < 10)
  953. {
  954. for(int x = 0; x<5;x++)
  955. {
  956. gotoxy(1,25+x);
  957. for(int y = 0; digital[0][x][y] != '\0';y++)
  958. {
  959. cout<<digital[0][x][y];
  960. }
  961. cout<<" ";
  962. for(int y = 0; digital[hh][x][y] != '\0';y++)
  963. {
  964. cout<<digital[hh][x][y];
  965. }
  966. }
  967. }
  968. else
  969. {
  970. for(int x = 0; x<5;x++)
  971. {
  972. gotoxy(1,25+x);
  973. for(int y = 0; digital[(hh/10)%10][x][y] != '\0';y++)
  974. {
  975. cout<<digital[(hh/10)%10][x][y];
  976. }
  977. cout<<" ";
  978. for(int y = 0; digital[hh%10][x][y] != '\0';y++)
  979. {
  980. cout<<digital[hh%10][x][y];
  981. }
  982. }
  983.  
  984. }
  985. }
  986.  
  987. void renderdigitalapm(int apm)
  988. {
  989. for(int x = 0; x<5;x++)
  990. {
  991. gotoxy(57,25+x);
  992. if(apm>12)
  993. {
  994. for(int y = 0; digital[12][x][y] != '\0';y++)
  995. {
  996. cout<<digital[12][x][y];
  997. }
  998. }
  999. else
  1000. {
  1001. for(int y = 0; digital[11][x][y] != '\0';y++)
  1002. {
  1003. cout<<digital[11][x][y];
  1004. }
  1005. }
  1006. }
  1007. }
  1008.  
  1009. void renderdigital()
  1010. {
  1011. for(int x = 0; x<5;x++)
  1012. {
  1013. gotoxy(16,25+x);
  1014. for(int y = 0; digital[10][x][y] != '\0';y++)
  1015. {
  1016. cout<<digital[10][x][y];
  1017. }
  1018. }
  1019.  
  1020. for(int x = 0; x<5;x++)
  1021. {
  1022. gotoxy(36,25+x);
  1023. for(int y = 0; digital[10][x][y] != '\0';y++)
  1024. {
  1025. cout<<digital[10][x][y];
  1026. }
  1027. }
  1028. }
  1029.  
  1030. void renderhands()
  1031. {
  1032. time_t t = time(0);
  1033. tm* now = localtime(&t);
  1034.  
  1035. int x = now->tm_sec;
  1036. int xx = now->tm_min;
  1037. int xxx = (now->tm_hour)%11;
  1038. renderdigitalss(x);
  1039. renderdigitalmm(xx);
  1040. renderdigitalhh(xxx);
  1041. renderdigitalapm(xxx);
  1042. while(true)
  1043. {
  1044. xxx = xxx%11;
  1045. for(int y = 0;y<5;y++)
  1046. {
  1047. if(hours[xxx][y][0] == 0 && hours[xxx][y][1] == 0)
  1048. {
  1049. continue;
  1050. }
  1051. gotoxy(((hours[xxx][y][0]*2)+22),(hours[xxx][y][1]+2));
  1052. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13);
  1053. cout << "hh";
  1054.  
  1055. }
  1056.  
  1057. for(int y = 0;y<10;y++)
  1058. {
  1059. if(seconds[xx][y][0] == 0 && seconds[xx][y][1] == 0)
  1060. {
  1061. continue;
  1062. }
  1063. gotoxy(((seconds[xx][y][0]*2)+22),(seconds[xx][y][1]+2));
  1064. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
  1065. cout << "mm";
  1066.  
  1067. }
  1068.  
  1069. for(int y = 0;y<25;y++)
  1070. {
  1071. if(seconds[x][y][0] == 0 && seconds[x][y][1] == 0)
  1072. {
  1073. continue;
  1074. }
  1075. gotoxy(((seconds[x][y][0]*2)+22),(seconds[x][y][1]+2));
  1076. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
  1077. cout << "s";
  1078.  
  1079. }
  1080.  
  1081. Sleep(1000);
  1082.  
  1083. for(int y = 0;y<5;y++)
  1084. {
  1085. if(hours[xxx][y][0] == 0 && hours[xxx][y][1] == 0)
  1086. {
  1087. continue;
  1088. }
  1089. gotoxy(((hours[(xxx - 1)][y][0]*2)+22),(hours[(xxx-1)][y][1]+2));
  1090. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13);
  1091. cout << " ";
  1092.  
  1093. }
  1094.  
  1095.  
  1096. for(int y = 0;y<10;y++)
  1097. {
  1098. if(seconds[xx][y][0] == 0 && seconds[xx][y][1] == 0)
  1099. {
  1100. continue;
  1101. }
  1102. gotoxy(((seconds[xx][y][0]*2)+22),(seconds[xx][y][1]+2));
  1103. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
  1104. cout << " ";
  1105.  
  1106. }
  1107.  
  1108. for(int y = 0;y<25;y++)
  1109. {
  1110. if(seconds[x][y][0] == 0 && seconds[x][y][1] == 0)
  1111. {
  1112. continue;
  1113. }
  1114. gotoxy(((seconds[x][y][0]*2)+22),(seconds[x][y][1]+2));
  1115. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
  1116. cout << " ";
  1117.  
  1118. }
  1119.  
  1120. if(x == 59)
  1121. {
  1122. time_t t = time(0);
  1123. tm* now = localtime(&t);
  1124. x = now->tm_sec;
  1125. xx = now->tm_min;
  1126. renderdigitalss(x);
  1127. renderdigitalmm(xx);
  1128. }
  1129. else
  1130. {
  1131. time_t t = time(0);
  1132. tm* now = localtime(&t);
  1133. x = now->tm_sec;
  1134. renderdigitalss(x);
  1135.  
  1136. }
  1137.  
  1138. if(xx==60)
  1139. {
  1140. xx=0;
  1141. time_t t = time(0);
  1142. tm* now = localtime(&t);
  1143. xxx = now->tm_hour;
  1144. renderdigitalapm(xxx);
  1145. renderdigitalhh(xxx%11);
  1146. }
  1147.  
  1148. }
  1149. }
  1150.  
  1151. void rendernumbers()
  1152. {
  1153. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
  1154. gotoxy(43,3);
  1155. cout << "12";
  1156. gotoxy(52,4);
  1157. cout << "01";
  1158. gotoxy(58,8);
  1159. cout << "02";
  1160. gotoxy(62,12);
  1161. cout << "03";
  1162. gotoxy(58,17);
  1163. cout << "04";
  1164. gotoxy(52,20);
  1165. cout << "05";
  1166. gotoxy(43,22);
  1167. cout << "06";
  1168. gotoxy(34,20);
  1169. cout << "07";
  1170. gotoxy(28,17);
  1171. cout << "08";
  1172. gotoxy(24,12);
  1173. cout << "09";
  1174. gotoxy(28,8);
  1175. cout << "10";
  1176. gotoxy(32,5);
  1177. cout << "11";
  1178. }
  1179.  
  1180.  
  1181.  
  1182. int main()
  1183. {
  1184.  
  1185. system("mode con:cols=88 lines=50");
  1186. HWND consoleWindow = GetConsoleWindow();
  1187. SetWindowPos( consoleWindow, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOZORDER );
  1188. fontsize(30,15);
  1189. rendercicle();
  1190. rendernumbers();
  1191. renderdigital();
  1192. renderhands();
  1193. getch();
  1194. return 0;
  1195. }
  1196.  
  1197. void fontsize(int a, int b){
  1198. PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx = new CONSOLE_FONT_INFOEX();
  1199. lpConsoleCurrentFontEx->cbSize = sizeof(CONSOLE_FONT_INFOEX);
  1200. GetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), 0, lpConsoleCurrentFontEx);
  1201. lpConsoleCurrentFontEx->dwFontSize.X = a;
  1202. lpConsoleCurrentFontEx->dwFontSize.Y = b;
  1203. SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), 0, lpConsoleCurrentFontEx);
  1204. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement