{"id":369,"date":"2010-11-25T21:55:11","date_gmt":"2010-11-25T20:55:11","guid":{"rendered":"http:\/\/roboblog.fatal-fury.de\/?p=369"},"modified":"2014-11-16T22:09:22","modified_gmt":"2014-11-16T21:09:22","slug":"c-gotoxy-konsole-ascii-bildschirmschoner","status":"publish","type":"post","link":"http:\/\/roboblog.fatal-fury.de\/?p=369","title":{"rendered":"C gotoxy Konsole &#038; ASCII Bildschirmschoner"},"content":{"rendered":"<p>M\u00f6chte man ohne zus\u00e4tzliche Libs den Cursor auf der Konsole frei bewegen, langt folgender kleiner Hack den man sich schnell aus dem Internet googelt.<\/p>\n<p>Und schwubs di wupp war ein kleiner ASCII Bildschirmschoner hingezaubert.<\/p>\n<pre>#include < stdio.h >\r\n\r\nvoid gotoxy(int x,int y)\r\n{\r\n  printf(\"%c[%d;%df\",0x1B,y,x);\r\n}\r\n\r\nint main()\r\n{\r\n  int x = 0, y = 0;\r\n  char c = 0;\r\n  system(\"clear\");\r\n\r\n  while(1)\r\n  {\r\n    x = rand()%50;\r\n    y = rand()%25;\r\n    c = rand()%'z' + ' ';\r\n    gotoxy(x,y);\r\n    printf(\"%c\", c);\r\n    fflush(stdout);\r\n    sleep(1);\r\n  }\r\n}<\/pre>\n<p>Und so schaut er aus<\/p>\n<pre>a  avD F        !    ` U \/v   y'   z    Y y  j 5\r\n j   >         \\            X         t\r\nS     9                          e o          X\r\n    R x              m    q            P c   E  >\r\n-        7r .   =,  7          l       1\r\n  r           m      e       c#     x     ]   \"\r\n         t  B       W  b          V\r\n      G       l  m V  OO        zd\r\n&   7        rX@\"  >     dJ          3 )\r\nh    &        H           R    F         3\r\n   !    l   n     6 K m         #     @  u\r\n        h  # |      O               ,    &\r\nj  J        *   P     r c  E \/      $\r\n         S       \\     S      ^  j5S%f          c\r\n                         p     z_z l           n\r\n               R        f       N   ;  7  q    0\r\n     J   i&     H|   ?    *        y  I      s\r\na  |     #    Q   5   g\\      D   F       e Ho\r\n  f b  ]            <y      9         {\r\n    f         +6               ^      (D7     I\r\n                qx W   .  o @ ?  V        D   x E\r\nV    L          1              zX      G1$     A\r\n  #  V                              p    U2\r\n      M  '  8     ~_5&p               \"z   O  :\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>M\u00f6chte man ohne zus\u00e4tzliche Libs den Cursor auf der Konsole frei bewegen, langt folgender kleiner Hack den man sich schnell aus dem Internet googelt. Und schwubs di wupp war ein kleiner ASCII Bildschirmschoner hingezaubert. #include < stdio.h > void gotoxy(int x,int y) { printf(\"%c[%d;%df\",0x1B,y,x); } int main() { int x = 0, y = 0; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[14],"class_list":["post-369","post","type-post","status-publish","format-standard","hentry","category-allgemein","tag-c"],"_links":{"self":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369"}],"version-history":[{"count":9,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions"}],"predecessor-version":[{"id":378,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions\/378"}],"wp:attachment":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}