Add alt versions to 2004/gavare + formatting

There already was one alt version which I found from the author's
website about the entry; they used the version for development and it's
unobfuscated. But two new ones were added.

The most important feature is that it allows one to change the image
size along with the anti-alias setting at compile time. This is
gavare.alt.c. The second version (which also has the size/anti-alias
changes) should theoretically work for Windows. This is gavare.alt2.c
and running make alt will not try and compile it as most it'll fail on
sane systems. Instead try make alt2. Both of these versions have some
form of protection with the size/anti-alias setting and one does not
have to define all three to get it to compile due to
'#ifndef..#elif..#endif' in the code.

The README.md file has been format/typo fixed.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-18 11:47:47 -08:00
1 parent 9d6c5c0a4c
commit 014e4835b5
6 files changed
+26 -8

No files matched your search

+1
View File
@@ -1,5 +1,6 @@
gavare
gavare.alt
gavare.alt2
ioccc_ray.ppm
gavare.r3
gavare.orig
+1
View File
@@ -138,6 +138,7 @@ ${PROG}: ${PROG}.c
alt: data ${ALT_TARGET}
@${TRUE}
# alternative executable for Windows
alt2: ${PROG}.alt2
@${TRUE}
+2 -2
View File
@@ -31,8 +31,8 @@ entry](https://gavare.se/ioccc/ioccc_gavare.c.html) an unobfuscated version that
was used during development, which we have included in the file
[gavare.r3.c](gavare.r3.c).
Finally, there's an untested version for Windows,
[gavare.alt2.c](gavare.alt2.c), that sets binary mode on `stdout`.
Finally, there's a version, [gavare.alt2.c](gavare.alt2.c) that sets binary mode
on `stdout` which theoretically should work in Windows.
### Alternate build:
-2
View File
@@ -4,14 +4,12 @@
#undef XX
#define XX 1024
#endif
#ifndef YY
#define YY 768
#elif YY < 1
#undef YY
#define YY 768
#endif
#ifndef AA
#define AA 3
#elif AA < 1
+18
View File
@@ -1,6 +1,24 @@
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#ifndef XX
#define XX 1024
#elif XX < 1
#undef XX
#define XX 1024
#endif
#ifndef YY
#define YY 768
#elif YY < 1
#undef YY
#define YY 768
#endif
#ifndef AA
#define AA 3
#elif AA < 1
#define AA 3
#endif
X=XX; Y=YY; A=AA;
J=0;K=-10;L=-7;M=1296;N=36;O=255;P=9;_=1<<15;E;S;C;D;F(b){E="1""111886:6:??AAF"
+4 -4
View File
@@ -2689,13 +2689,13 @@ this.
Cody added three different [alternate
versions](2004/gavare/README.md#alternate-code):
- [gavare.alt.c](2004/gavare/gavare.alt.c): allows you to change the image size
- [gavare.alt.c](2004/gavare/gavare.alt.c) allows you to change the image size
and anti-alias setting at compile time.
- [gavare.alt2.c](2004/gavare/gavare.alt2.c): like
- [gavare.alt2.c](2004/gavare/gavare.alt2.c) is like
[gavare.alt.c](2004/gavare/gavare.alt.c) but it should work for Windows as well
(it sets binary mode on `stdout`).
- [gavare.r3.c](2004/gavare/gavare.r3.c): the author's unobfuscated version that
was used during development, found on their [website about the
- [gavare.r3.c](2004/gavare/gavare.r3.c) is the author's unobfuscated version
that was used during development, found on their [website about the
entry](https://gavare.se/ioccc/ioccc_gavare.c.html).