From 7dc35c0782990af569238de9632705ed66fe72af Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 18 Apr 2023 12:33:30 -0700 Subject: [PATCH] Add alt code to 1996/eldby - moves too fast now For those who have any sensitivity to things zooming by (like me) or who also just thinks it goes by too fast with modern systems to truly enjoy (like me) there is now the alt version. This should help make it more like in the past but without tampering with the original code. See the README.md for how to reconfigure the default sleep time. Format fixes in README.md as well. --- 1996/eldby/.gitignore | 1 + 1996/eldby/Makefile | 6 +++--- 1996/eldby/README.md | 23 ++++++++++++++++++++++- 1996/eldby/eldby.alt.c | 10 ++++++++++ 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 1996/eldby/eldby.alt.c diff --git a/1996/eldby/.gitignore b/1996/eldby/.gitignore index 6fffc035b..e3f55ca6d 100644 --- a/1996/eldby/.gitignore +++ b/1996/eldby/.gitignore @@ -1 +1,2 @@ eldby +eldby.alt diff --git a/1996/eldby/Makefile b/1996/eldby/Makefile index 9bdeef389..a6d42c6ed 100644 --- a/1996/eldby/Makefile +++ b/1996/eldby/Makefile @@ -58,7 +58,7 @@ ARCH= # Defines that are needed to compile # -CDEFINE= +CDEFINE= -DZ=35000 # Include files that are needed to compile # @@ -114,8 +114,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= -ALT_TARGET= +ALT_OBJ= ${PROG}.alt.o +ALT_TARGET= ${PROG}.alt ################# diff --git a/1996/eldby/README.md b/1996/eldby/README.md index 8072fb18a..6e6a4b5df 100644 --- a/1996/eldby/README.md +++ b/1996/eldby/README.md @@ -20,7 +20,28 @@ make all WARNING: on modern systems this is very fast and could be a problem for those susceptible to photosensitivity. Please try this one with caution if this -applies to you! The same goes for people who can be overstimulated. +applies to you! The same goes for people who can be overstimulated. See below +for alternate version if you want to see it go slower or if seeing things move +by too fast is a problem for you. + +NOTE: to reset the sanity of your terminal after this program ends try `reset`. + + +### Alternate code: + +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) provided an alternate +version which uses `usleep()` in between writing the output for those who are +sensitive to text flashing by rapidly (it affects him too but he also thinks it +moves too fast nowadays anyway). The default sleep duration is `35000` but you can +change it at compilation like: + +```sh +make CFLAGS+="-DZ=20000" clobber alt +``` + +Use `eldby.alt` as you would `eldby`. + +Thank you Cody! ## Judges' remarks: diff --git a/1996/eldby/eldby.alt.c b/1996/eldby/eldby.alt.c new file mode 100644 index 000000000..fc4c02289 --- /dev/null +++ b/1996/eldby/eldby.alt.c @@ -0,0 +1,10 @@ +#include +#include +float s=1944,x[5],y[5],z[5],r[5],j,h,a,b,d,e;int i=33,c,l,f=1;int g(){return f= +(f*6478+1)%65346;}m(){x[i]=g()-l;y[i]=(g()-l)/4;r[i]=g()>>4;}main(){char t[1948 +]=" `MYmtw%FFlj%Jqig~%`jqig~Etsqnsj3stb",*p=t+3,*k="3tjlq9TX";l=s*20;while(i0) +{for(e=b;e*e>b*1.01||e*e