PageRenderTime 70ms CodeModel.GetById 41ms RepoModel.GetById 0ms app.codeStats 0ms

/2004/vik1.c

https://bitbucket.org/c00kiemon5ter/ioccc-obfuscated-c-contest
C | 63 lines | 50 code | 12 blank | 1 comment | 2 complexity | cc5856851fb3ee57c42d1df43830cf69 MD5 | raw file
  1. #include <stdio.h>
  2. #include <sys/time.h>
  3. #include <X11/Xlib.h>
  4. #include <X11/keysym.h>
  5. #define Z(a)main(a,T)
  6. Window L;
  7. #define J (K,
  8. GC N;
  9. #define I ; for(
  10. int g,h,i,j,k,l,m,n,p,q,r,v,w,x,y,z,
  11. #define W(a)(y/v*!w+((S+1)>>a&255)*(D+y/(z|w-2))/D)<<a|
  12. o,b,f,u,s,c,a,t,e,d, C
  13. #define U (struct timeval*)H
  14. [1<<18],A=100,B=4,D=200,E=53300,F=65793,H[4];
  15. #define V(a)#a": %1d'%02d\"%02d "
  16. Display*K; Pixmap M; char P[99]; int main
  17. #define Y(a,b)(a<b?a:b)
  18. (int S,char**T){
  19. #define X(a)\
  20. XDrawLine J M,N,D+l a m,o,D+l a n,o),
  21. XEvent O I p=E/5; --S&~1?
  22. XSetForeground J N,W(0)W(8)W(16)0),X(-)X(+)gettimeofday(U,0):S?z=97
  23. == ** ++ T,w=A==z[*T],B-=w[z+*T]%3,S:++S;
  24. XCopyArea J M,L,N,0,0,e,D,0,0),
  25. XSync J 0),
  26. XFlush (K),select(0,0,0,0,U+1)){ I 3[H]=F; p==++r?K=
  27. XOpenDisplay (0),N=
  28. XCreateGC J L=
  29. XCreateSimpleWindow J RootWindow(K,0),0,0,e=D*2,D,0,0,0),0,0),
  30. XSelectInput J L,KeyPressMask|KeyReleaseMask),
  31. XMapWindow J L),M=
  32. XCreatePixmap J L,e,d=D,DefaultDepth(K,0)),u=h=q=E:r<p?a=r/D%6,r[C
  33. +p]=(l+=!a|a%2?g:a-3)/4,r[C]=2*r<=p?(n+=(i-=(i+34&&r
  34. /149%B)-(i-34&&r/353%3)))/55:C[p-r],v=4-3*z:
  35. XPending (K)?C[F+
  36. XLookupKeysym (&O.xkey,0&
  37. XNextEvent J&O))]^=O.type==KeyPress||O.type==KeyRelease,p:0;
  38. /* Some more code */
  39. )I k=C[F+XK_Right]-C[F+XK_Left],j=k?j+v*k*(j*k<8):j*.9,u+=(s=Y(C[F+XK_space]*
  40. 3+s-!!s,a))/9,c=u>p?q=Y(h,q),u%=p,Z(c=0):c,t+=j*(s+A)/e-s/i*(C[u+4]-C[u]),s=t
  41. *t>p?t*=.97,s*.8:g>a&&b*b<D*9?i:s,i=k=l=0,o=n=e; i-5; Z((k/17?o++==y?m=n=D,f
  42. -=A,o=30+9*i++:0,n-=2,m+=3,l=f/.7,y*F+A-i*k:k|!o?f=l=C[u]/-2-t,k+=17*w,o=k+++
  43. 20,n=k+k-k*k/9,F*p:o--<a?y=135,A*F|D:0)))I x=g=m=f=0,a=i=u+D,d+=9; o<f?n=2*e,
  44. Z(z?r+k*F*8:E-k*A*A),n=9+x/D,Z(!k+z?r=D*F+9:A<<17),n-=x/9/D,Z(i%p>6?h=r*(3+z)
  45. /5:r),n=x/13/e,Z(k?h:r),o++:(f=x/D+70+C[i+p]-C[u+p],o=x?o:f,k=2*i/41%2,l=C[--
  46. i]-C[u]-t,x+=D-(y=i-u),g=(d-i)%410?g:(a=o,b=l+B*x/e,x)/A,i>u); )I k=i=0,x=g,
  47. l=b; ++i==41+!f&&k?f=k=i=l=0,x=190,a=163:i==42?i=9,k=r:!k|i-41; n=(Y(Y(Y(75,A
  48. -i)/3,95-2*i),r-k+2*i)-k/r)*x/D,m=i<9?x*14/D:k?(i-31)/5*(i%12)?0:n-1:0,o=a-i*
  49. x/D,y=D-o,h=Z(k*r+k*f/F))I B=g?B:1-h%3,i=60,y=n=m,XDrawString J M,N,30,x,P,
  50. sprintf(P,V(Time)V(High)"Speed: %03dmph",h/A/i,h/A%i,h%A,q/A/i,q/A%i,q%A,s,Z(
  51. A<<17))),x=h; ++f<2*z*e; l=(x*=3)%e,o=x*x%a,Z(-1)); } return A**H+1[H]/p-c; }