Improve 2012/endoh1 alt code, add try.alt.sh
The alt code now has an option to use alarm(3) so that one need not hit ctrl-c/intr for each run (default 10 seconds, can be disabled or changed at compilation just like the other macros). This is used in try.alt.sh which shows the program (colour version) on the source code and then the text files provided by the author. The script does two 'versions' for each file: one with setting gravity factor to I (see author's remarks) and one without that. These changes make a nice demonstration of the entry. This commit also fixed a problem that the previous commit caused to do with the alt targets in the Makefile. This should complete the review of 2012/endoh1, leaving two more to go for 2012.
This commit is contained in:
1 parent
af3b4f5166
commit
c9503446e4
7 files changed
+106
-23
No files matched your search
+29
-14
@@ -4,11 +4,11 @@ make
|
||||
```
|
||||
|
||||
There are two alt versions that let you control the compile time variables that
|
||||
control the fluid behaviour and the added variable to speed up or slow down the
|
||||
fluid: one for the original black and white and the colour one added by the
|
||||
author at the request of the judges. Another version is the deobfuscated version
|
||||
provided by the author as well. See [alternate code](#alternate-code) below for
|
||||
more details.
|
||||
control the fluid behaviour and the added variables to speed up or slow down the
|
||||
fluid as well as setting a timeout (if not 0): one for the original black and
|
||||
white and the colour one added by the author at the request of the judges.
|
||||
Another version is the deobfuscated version provided by the author as well. See
|
||||
[alternate code](#alternate-code) below for more details.
|
||||
|
||||
|
||||
## To use:
|
||||
@@ -52,6 +52,10 @@ make alt alt2
|
||||
The `alt2` is only necessary if you wish to compile the deobfuscated version but
|
||||
it is equivalent in function to the original entry, [endoh1.c](endoh1.c).
|
||||
|
||||
In the `alt` versions a default time of 10 seconds is set as an alarm so that
|
||||
one can more easily go through the list of files to see them all in succession
|
||||
for fun. That is controlled by the variable `A`; 0 disables it.
|
||||
|
||||
If you wish to change the speed you should do:
|
||||
|
||||
```sh
|
||||
@@ -81,14 +85,13 @@ There is no restriction on what the number is because doing so prevents the
|
||||
macros from being defined to `I` which would prevent the author's remarks about
|
||||
it from being done.
|
||||
|
||||
If you want to disable the alarm time, set `A` to 0:
|
||||
|
||||
### Alternate use:
|
||||
```sh
|
||||
make clobber CDEFINE="-DA=0" alt
|
||||
```
|
||||
|
||||
Use `endoh1.alt`, `endoh1_color.alt` and `endoh1.alt2` as you would `endoh1`
|
||||
and `endoh1_color` above.
|
||||
|
||||
|
||||
### Alternate try:
|
||||
It cannot be < 0 or > 60 (arbitrarily selected).
|
||||
|
||||
Try slowing down the display by increasing the sleep time from `12321` to
|
||||
`50000`:
|
||||
@@ -125,13 +128,25 @@ You might try even:
|
||||
make clobber CDEFINE="-DG=I" alt
|
||||
```
|
||||
|
||||
and even:
|
||||
See the author's remarks for details on these macros.
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
Use `endoh1.alt`, `endoh1_color.alt` and `endoh1.alt2` as you would `endoh1`
|
||||
and `endoh1_color` above.
|
||||
|
||||
|
||||
### Alternate try:
|
||||
|
||||
To see two different ways run on the source file and each of the text files,
|
||||
try:
|
||||
|
||||
```sh
|
||||
make clobber CDEFINE="-DG=I -DV=I" alt
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
See the author's remarks for details on these macros.
|
||||
The second run of each will be with the gravity factor set to `I`.
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
Reference in new issue
Block a user