Add preview of 1984-2019
The 2020 winners are hinted it, but the source code is not there,
nor are the hints. Someone could look into the HTML and
see what was commented out, but that is not a problem because
WHO won is known and the name of their AWARD is known already.
Moreover a number of the winners have talked about what their
entirs do, so the commented out spoiler text is not a bit problem.
One will find HTML commented out with:
<!-- XXX remove when 2020 is ready
2020 links here
XXX remove when 2020 is ready -->
The "XXX remove when 2020 is ready" string is found at the
start and end comment blocks. Again, soneone could read
what was commented out, but that is OK since most of that
information is known or can be known. The following files
have such HTML comment blocks in them.
./winners.html
./years-spoiler.html
./years.html
In addition, ./all/summary.txt was modified to not
include the 2020 entries for the momemt.
The 2020 winner code AND write-ups are NOT part of this set.
p.s. The all/all.tar.bz2 does not contain the 2020 source code (yet?).
This commit is contained in:
1 parent
28efc67f5d
commit
c0663537cb
1683 files changed
+220064
No files matched your search
@@ -0,0 +1,285 @@
|
||||
#!/usr/bin/env make
|
||||
#
|
||||
# 2018 makefile
|
||||
#
|
||||
# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
|
||||
# is licensed under:
|
||||
#
|
||||
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
#
|
||||
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
|
||||
################
|
||||
# tool locations
|
||||
################
|
||||
#
|
||||
SHELL= /bin/bash
|
||||
CP= cp
|
||||
CPP= cpp
|
||||
GUNZIP= gunzip
|
||||
BUNZIP2= bunzip2
|
||||
GZIP_PROG= gzip
|
||||
BZIP2= bzip2
|
||||
CURL= curl
|
||||
DD= dd
|
||||
LD= ld
|
||||
MAKE= make
|
||||
RM= rm
|
||||
SED= sed
|
||||
TAR= tar
|
||||
TRUE= true
|
||||
MKDIR= mkdir
|
||||
MV= mv
|
||||
TR= tr
|
||||
GREP= grep
|
||||
SORT= sort
|
||||
UNIQ= uniq
|
||||
STRIP= strip
|
||||
|
||||
# Set X11_LIBDIR to the directory where the X11 library resides
|
||||
#
|
||||
#X11_LIBDIR= /usr/X11R6/lib
|
||||
#X11_LIBDIR= /usr/X11/lib
|
||||
X11_LIBDIR= /opt/X11/lib
|
||||
|
||||
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
|
||||
#
|
||||
#X11_INCDIR= /usr/X11R6/include
|
||||
#X11_INCDIR= /usr/X11/include
|
||||
X11_INCDIR= /opt/X11/include
|
||||
|
||||
# Compiler warnings
|
||||
#
|
||||
#CWARN=
|
||||
#CWARN= -Wall
|
||||
#CWARN= -Wall -Wextra
|
||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||
#CWARN= -Wall -Wextra -Weverything
|
||||
#CWARN= -Wall -Wextra -Weverything -pedantic
|
||||
#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
|
||||
|
||||
# Silence warnings that ${CWARN} would normally complain about
|
||||
#
|
||||
CSILENCE=
|
||||
#CSILENCE= -Wno-implicit-int
|
||||
|
||||
# compiler standard
|
||||
#
|
||||
#CSTD=
|
||||
#CSTD= -ansi
|
||||
#CSTD= -std=c11
|
||||
CSTD= -std=c99
|
||||
|
||||
# compiler bit architecture
|
||||
#
|
||||
# Some entries require 32-bitness:
|
||||
# ARCH= -m32
|
||||
#
|
||||
# Some entries require 64-bitness:
|
||||
# ARCH= -m64
|
||||
#
|
||||
# By default we assume nothing:
|
||||
#
|
||||
ARCH=
|
||||
|
||||
# defines that are needed to compile
|
||||
#
|
||||
CDEFINE=
|
||||
#CDEFINE= -DIOCCC=25
|
||||
|
||||
# include files that are needed to compile
|
||||
#
|
||||
CINCLUDE= $(shell sdl2-config --cflags)
|
||||
#CINCLUDE= -include stdlib.h
|
||||
#CINCLUDE= -include stdio.h
|
||||
#CINCLUDE= -include stdlib.h -include stdio.h
|
||||
#CINCLUDE= -I ${X11_INCDIR}
|
||||
|
||||
# optimization
|
||||
#
|
||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||
# A few compilers have broken optimizers or this entry make break
|
||||
# under those buggy optimizers and thus you may not want anything.
|
||||
# Reasonable compilers will allow for -O3.
|
||||
#
|
||||
#OPT=
|
||||
#OPT= -O
|
||||
#OPT= -O1
|
||||
#OPT= -O2
|
||||
OPT= -O3
|
||||
|
||||
# default flags for ANSI C compilation
|
||||
#
|
||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||
|
||||
# Libraries needed to build
|
||||
#
|
||||
LIBS= $(shell sdl2-config --libs)
|
||||
#LIBS= -L ${X11_LIBDIR}
|
||||
|
||||
# ANSI compiler
|
||||
#
|
||||
# Set CC to the name of your ANSI compiler.
|
||||
#
|
||||
# Some entries seem to need gcc. If you have gcc, set
|
||||
# both CC and MAY_NEED_GCC to gcc.
|
||||
#
|
||||
# If you do not have gcc, set CC to the name of your ANSI compiler, and
|
||||
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
|
||||
# to disable such programs.
|
||||
#
|
||||
CC= cc
|
||||
#CC=clang
|
||||
MAY_NEED_GCC= gcc
|
||||
|
||||
|
||||
##############################
|
||||
# Special flags for this entry
|
||||
##############################
|
||||
#
|
||||
OBJ= prog.o
|
||||
DATA=
|
||||
TARGET= prog
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
|
||||
|
||||
#################
|
||||
# build the entry
|
||||
#################
|
||||
#
|
||||
all: ${TARGET} ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
prog: prog.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
|
||||
###############
|
||||
# utility rules
|
||||
###############
|
||||
#
|
||||
everything: all alt
|
||||
|
||||
clean:
|
||||
${RM} -f ${OBJ} ${ALT_OBJ}
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||
@-if [ -e sandwich ]; then \
|
||||
${RM} -f sandwich; \
|
||||
echo 'ate sandwich'; \
|
||||
fi
|
||||
|
||||
nuke: clobber
|
||||
@${TRUE}
|
||||
|
||||
dist_clean: nuke
|
||||
@${TRUE}
|
||||
|
||||
install:
|
||||
@echo "Surely you are performing, Dr. May!"
|
||||
@${TRUE}
|
||||
|
||||
# backwards compatibility
|
||||
#
|
||||
build: all
|
||||
@${TRUE}
|
||||
|
||||
|
||||
##################
|
||||
# 133t hacker rulz
|
||||
##################
|
||||
#
|
||||
love:
|
||||
@echo 'not war?'
|
||||
@${TRUE}
|
||||
|
||||
haste:
|
||||
$(MAKE) waste
|
||||
@${TRUE}
|
||||
|
||||
waste:
|
||||
@echo 'haste'
|
||||
@${TRUE}
|
||||
|
||||
make:
|
||||
@echo 'Attend a maker faire'
|
||||
@${TRUE}
|
||||
|
||||
easter_egg:
|
||||
@echo you expected to often mis-understand this $${RANDOM} magic
|
||||
@echo chongo '<was here>' "/\\oo/\\"
|
||||
@echo Eggy
|
||||
|
||||
fabricate fashion form frame manufacture produce: make
|
||||
@${TRUE}
|
||||
|
||||
sandwich:
|
||||
@if [ `id -u` -eq 0 ]; then \
|
||||
echo 'Okay.'; \
|
||||
echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
|
||||
else \
|
||||
echo 'What? Make it yourself.'; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Understand the history of the Homebrew Computer Club
|
||||
# as well as the West Coast Computer Faire and
|
||||
# you might be confused different. :-)
|
||||
#
|
||||
supernova: nuke
|
||||
@-if [ -r .code_anal ]; then \
|
||||
${RM} -f .code_anal_v6; \
|
||||
else \
|
||||
echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
|
||||
fi
|
||||
@echo A $@ helps ${MAKE} the elements that help form planets
|
||||
@${TRUE}
|
||||
|
||||
deep_magic:
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --deep_magic 3a3fabb90892eeb2f610ae0f74a35a970060665a063ab702bd686c17c4ae07f6 --FNV1a_hash_256_bit "prog"; \
|
||||
else \
|
||||
echo "Wrong! Do it again!"; \
|
||||
sleep 2; \
|
||||
echo "Wrong! Do it again!"; \
|
||||
sleep 2; \
|
||||
echo "Wrong! Do it again!"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
magic: deep_magic
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --mode 216091 --level 216193 --FNV1a_hash_256_bit "prog"; \
|
||||
else \
|
||||
echo "If you don't eat yer meat, you can't have any pudding!"; \
|
||||
echo "How can you have any pudding if you don't eat yer meat?!"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
# The IOCCC resident astronomer states
|
||||
#
|
||||
charon: supernova
|
||||
@echo $@ is a dwarf planet
|
||||
@echo dwarf is a type of planet
|
||||
@echo $@ is a planet
|
||||
|
||||
pluto: supernova
|
||||
${MAKE} charon
|
||||
@echo $@ is a dwarf planet
|
||||
@echo dwarf is a type of planet
|
||||
@echo $@ is a planet
|
||||
@echo get used to having lots of planets because a $< can ${MAKE} a lot of them
|
||||
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="GENERATOR" content="mkd2html 2.1.5a DL=DISCOUNT">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="../hint.css">
|
||||
<title>Most unstable</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Most unstable</h1>
|
||||
|
||||
<p>Edward Giles</p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>To use:</h3>
|
||||
|
||||
<pre><code>sudo apt install libsdl2-dev # Linux
|
||||
Something else # MacOS
|
||||
make
|
||||
./prog
|
||||
</code></pre>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>./prog ioccc.txt
|
||||
./prog prog.c
|
||||
</code></pre>
|
||||
|
||||
<h3>Selected Judges Remarks:</h3>
|
||||
|
||||
<p>Can you explain the behavior of the program when ioccc.txt is given to it as input?</p>
|
||||
|
||||
<p>How would the description of the state machine look like when translated from
|
||||
Polynomish to English?</p>
|
||||
|
||||
<h2>Author’s comments:</h2>
|
||||
|
||||
<h1>Remarks</h1>
|
||||
|
||||
<p>This entry graphically displays a simulation of sand falling.
|
||||
It uses SDL to draw the interface.</p>
|
||||
|
||||
<p>The code makes the following assumptions about the underlying system:</p>
|
||||
|
||||
<ul>
|
||||
<li>SDL 2 is installed from https://libsdl.org</li>
|
||||
<li>“double” is an IEEE 754 floating-point type and sizeof(double)==8</li>
|
||||
<li>The compiler supports the C99 standard</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>In order to simulate the motion of the sand, a cellular automaton is used. The
|
||||
state transition table is not stored directly. Instead, the program stores the
|
||||
coefficients of a polynomial that map each state to the correct one. These
|
||||
coefficients are stored as raw hexadecimal in the V[] array, and they are
|
||||
reinterpreted as doubles when used. This allows more numeric precision in fewer
|
||||
characters (base 16 > base 10), and makes the purpose of the array less clear.</p>
|
||||
|
||||
<p>The code is laid out graphically as a bucket pouring sand, and it is far easier
|
||||
to observe this high-level layout than the code’s actual function.</p>
|
||||
|
||||
<p>The preprocessor is used to both obfuscate the code as a whole and abbreviate
|
||||
the calls to SDL. Additionally, throughout the code, the variables were named
|
||||
so that they are short and easily confused with each other.</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<!--
|
||||
(c) Copyright 1984-2018, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
|
||||
<TABLE><TR>
|
||||
<TD><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a></TD>
|
||||
<TD><P>© Copyright 1984-2018,
|
||||
<A HREF="/judges.html">Leo Broukhis, Simon Cooper, Landon Curt Noll</A>
|
||||
- All rights reserved<BR>
|
||||
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</P></TD>
|
||||
<TD> <!--<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>--></TD>
|
||||
</TR></TABLE>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
# Most unstable
|
||||
|
||||
Edward Giles
|
||||
|
||||
|
||||
## Judges' comments:
|
||||
### To use:
|
||||
|
||||
sudo apt install libsdl2-dev # Linux
|
||||
Something else # MacOS
|
||||
make
|
||||
./prog
|
||||
|
||||
### Try:
|
||||
|
||||
./prog ioccc.txt
|
||||
./prog prog.c
|
||||
|
||||
### Selected Judges Remarks:
|
||||
|
||||
Can you explain the behavior of the program when ioccc.txt is given to it as input?
|
||||
|
||||
How would the description of the state machine look like when translated from
|
||||
Polynomish to English?
|
||||
|
||||
|
||||
## Author's comments:
|
||||
Remarks
|
||||
=======
|
||||
|
||||
This entry graphically displays a simulation of sand falling.
|
||||
It uses SDL to draw the interface.
|
||||
|
||||
The code makes the following assumptions about the underlying system:
|
||||
|
||||
* SDL 2 is installed from https://libsdl.org
|
||||
* "double" is an IEEE 754 floating-point type and sizeof(double)==8
|
||||
* The compiler supports the C99 standard
|
||||
|
||||
In order to simulate the motion of the sand, a cellular automaton is used. The
|
||||
state transition table is not stored directly. Instead, the program stores the
|
||||
coefficients of a polynomial that map each state to the correct one. These
|
||||
coefficients are stored as raw hexadecimal in the V[] array, and they are
|
||||
reinterpreted as doubles when used. This allows more numeric precision in fewer
|
||||
characters (base 16 > base 10), and makes the purpose of the array less clear.
|
||||
|
||||
The code is laid out graphically as a bucket pouring sand, and it is far easier
|
||||
to observe this high-level layout than the code's actual function.
|
||||
|
||||
The preprocessor is used to both obfuscate the code as a whole and abbreviate
|
||||
the calls to SDL. Additionally, throughout the code, the variables were named
|
||||
so that they are short and easily confused with each other.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
<!--
|
||||
(c) Copyright 1984-2018, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
@@ -0,0 +1,50 @@
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
```````````````````````````````````````a`````````````````````````````````````````
|
||||
```````````````````````````````````````a`````````````````````````````````````````
|
||||
```````````````````````````````````````a`````````````````````````````````````````
|
||||
```````````````````````````````````````a`````````````````````````````````````````
|
||||
```````````````````````````````````````a`````````````````````````````````````````
|
||||
```````````````````````````````````````a`````````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a````````````````````````````````````````````
|
||||
````````````````````````````````````a`````a``````````````````````````````````````
|
||||
`````````````````````````````````````aaaaa```````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
#include "SDL.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define S(a,b) b*a
|
||||
#define A int
|
||||
#define N(a,b) b=a
|
||||
#define D "sand.txt"
|
||||
|
||||
#define G(_) SDL_##_
|
||||
#define GX(_) G(Create##_)
|
||||
#define GY(_) G(Destroy##_)
|
||||
#define GZ(_) G(Render##_)
|
||||
#define GA(_) if(!(_)){pri\
|
||||
ntf("L%d SDL Error: %s\n",_\
|
||||
_LINE__,G(GetError)());exit(1);}
|
||||
#define GB(__,_G,G_,GG) G_(__);_G(GG)
|
||||
|
||||
// important constants
|
||||
int ONE = 1;
|
||||
int ZRO = 0;
|
||||
|
||||
uint64_t V[]={
|
||||
0x3e62f947d02f49bc,0xbed0bdb402d9ed0c,0x3f2acda5f517c6b6,0xbf79c2448bb7eca0,
|
||||
0x3fc091746cc843a3,0xbffe1cce22ed8f8f,0x4033e22da447fb5b,0xc06352e2b9c91269,
|
||||
0x408bacb717fa44db,0xc0aceee93bc74aae,0x40c59df977dbfd52,0xc0d639fd2e095789,
|
||||
0x40dd7401cce0cb64,0xc0d63a270ab7d164,0x40bc52eb9bd102e2,0x3fe0000000000000};
|
||||
|
||||
#define L lL[L1
|
||||
int Ll1(A i)
|
||||
{N(0;,double Ll)for(
|
||||
A N(0; l<,l) 16; ) S(( double*
|
||||
),S(i+,Ll= Ll))(V+l++);return Ll; }
|
||||
#define M(a,b);L+a]=(L+a]&2)|(LL/b&1)
|
||||
void _L(int* lL,A l,A L1){ A N( Ll1,
|
||||
LL )( ( L]==1)| 2*(L +1]== 1) |4 * (
|
||||
L+ l] != 0)|8 *(L +l+ 1]!= 0)) M(0,
|
||||
1) M(1,2)M(l,4)M(l+1,8);}N(0,A l1L);
|
||||
#define L_(l11,L1) for( N(( l11);,\
|
||||
l1)l1 < lll;l1 +=ll1)for( N(L1 ;ll<\
|
||||
l1l-,ll)1; ll +=2)_L( Ll,l1l,l1+ll);
|
||||
void JJ(A*Ll,A l1l,A l){A ll,l1,S((l
|
||||
-1),lll=l1l),N(2*,ll1)l1l;l1L^=
|
||||
1;L_(l1L?l1l:0,l1L)}
|
||||
#define GU
|
||||
#define GO 1
|
||||
#define G0 >=0
|
||||
#define G2 GZ (er*)
|
||||
#define G3 G( Init)
|
||||
#define G5 G( Quit)
|
||||
#define GV while
|
||||
#define GC G( QUIT)
|
||||
#define GG G( Delay)
|
||||
#define GW G( Event)
|
||||
#define GE GZ (Clear)
|
||||
#define G1 G( Window*)
|
||||
#define GI GY (Window)
|
||||
#define G6 GX (Window)
|
||||
#define GF GZ (Present)
|
||||
#define G8 GX (Renderer)
|
||||
#define GH GY (Renderer)
|
||||
#define GN G( PollEvent)
|
||||
#define G4 G( INIT_VIDEO)
|
||||
#define G7 G( WINDOW_SHOWN)
|
||||
#define GD G( SetRenderDrawColor)
|
||||
A main(A ac,char**av){int P[4018]; memset(P,0,4018*
|
||||
sizeof(A));S(j=fopen,FILE)(ac>1?av[1]:D,"r");if(j){
|
||||
for(A F=0;F<4018; F++)P [F]=getc(j)-96;fclose(j) ;}
|
||||
|
||||
G1 GL=0;G2 GM = 0;GA (G3(G4 )G0 )atexit(
|
||||
G5); GA( GL= G6( D, ZRO, ZRO,
|
||||
800, 480, G7)) GA( GM= G8( GL,
|
||||
-1,0) )int GK= GO+ (ONE= ZRO ++); GW GJ;
|
||||
GV( GK){ GV( GN(& GJ) GU!= 0){
|
||||
GK= GJ. type== GC? ONE: GK;} GA(
|
||||
GD(GM,0,0,0, 255) G0); GE( GM); G(Rect)Q;Q.w
|
||||
|
||||
=Q.h=10;JJ(P,82,49);A k=+0;while(k<81&&P[k])k++;P[k
|
||||
]=l1L;for(A K=ZRO;K<49; K++){for(A O=1;O<81; O++){Q
|
||||
.x=-(ZRO-O)*10;Q.y=(K-1)*10;A v=P[82*K+O];if(v==ZRO
|
||||
)GD(GM,238,204,106,255); else if(v==ONE)GD(GM,0,0,0
|
||||
,255); else GD(GM,143,149,157,255);GZ(FillRect)(GM,
|
||||
&Q);}}GB(GM,GG,GF,40)GU;}GB(GM,GI,GH,GL);return 0;}
|
||||
@@ -0,0 +1,50 @@
|
||||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb`````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`aaaa```a````aa``````````````````````````````````````````````````````````````````
|
||||
aaaaaaaaaaaaaaa``````````````````````````````````````````````````````````````````
|
||||
aaaaaaaaaaaaaaaabb````````````````bbbbbbbbb``````````````````````````````````````
|
||||
aaaaaaaaaaaaaaabb````````````````bb``````````````````````````````````````````````
|
||||
aaaaaaaaaaaaaabb````````````````bb```````````````````````````````````````````````
|
||||
baaaaaaaaaaaabb````````````````bb````````````````````````````````````````````````
|
||||
bbaaaaaaaaaabb````````````````bb`````````````````````````````````````````````````
|
||||
`bbaaaaaaaabb````````````````bb``````````````````````````````````````````````````
|
||||
``bbaaaaaabb````````````````bb```````````````````````````````````````````````````
|
||||
```bbaaaabb`````````````````b````````````bbbbbbbbbbbbbbb`````````````````````````
|
||||
````bbaabb```````````````````````````````````````````````````````````````````````
|
||||
`````bbab````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
````b````````````````````````````````````````````````````````````````````````````
|
||||
````b````````````````````````````````````````````````````````````````````````````
|
||||
````b````````````````````````````````````````````````````````````````````````````
|
||||
````b``````````````````````````````b````````````````````````b````````````````````
|
||||
````b``bbb``````````````````b``````bb``````````````````````bb````````````````````
|
||||
````b`b```b`````````````````b```````b``````````````````````b`````````````````````
|
||||
````b`b``````bbb``b`bb```bb`b```````bb````````````````````bb`````````````````````
|
||||
````b``bbb``````b`bb``b`b``bb````````b````````````````````b``````````````````````
|
||||
````b`````b``bbbb`b```b`b```b````````bb``````````````````bb``````````````````````
|
||||
````b`b```b`b```b`b```b`b```b`````````b``````````````````b```````````````````````
|
||||
````b``bbb```bbbb`b```b``bbbb`````````bbbbbbbbbbbbbbbbbbbb```````````````````````
|
||||
````b````````````````````````````````````````````````````````````````````````````
|
||||
````bbbbbbbbbbbbbbbbbbbbbbbbbb```````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````b```````````````````````````````````````
|
||||
`````````````bbbbb`bbbbbbbbbbbbbbbbbbbbbbb```````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````bbb`````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
`````````````````````````````````````````````````````````````````````````````````
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb`````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`aaaa```a````aa``````````````````````````````````````````````````````````````````␍aaaaaaaaaaaaaaa``````````````````````````````````````````````````````````````````␍aaaaaaaaaaaaaaaabb````````````````bbbbbbbbb``````````````````````````````````````␍aaaaaaaaaaaaaaabb````````````````bb``````````````````````````````````````````````␍aaaaaaaaaaaaaabb````````````````bb```````````````````````````````````````````````␍baaaaaaaaaaaabb````````````````bb````````````````````````````````````````````````␍bbaaaaaaaaaabb````````````````bb`````````````````````````````````````````````````␍`bbaaaaaaaabb````````````````bb``````````````````````````````````````````````````␍``bbaaaaaabb````````````````bb```````````````````````````````````````````````````␍```bbaaaabb`````````````````b````````````bbbbbbbbbbbbbbb`````````````````````````␍````bbaabb```````````````````````````````````````````````````````````````````````␍`````bbab````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍````b````````````````````````````````````````````````````````````````````````````␍````b````````````````````````````````````````````````````````````````````````````␍````b````````````````````````````````````````````````````````````````````````````␍````b``````````````````````````````b````````````````````````b````````````````````␍````b``bbb``````````````````b``````bb``````````````````````bb````````````````````␍````b`b```b`````````````````b```````b``````````````````````b`````````````````````␍````b`b``````bbb``b`bb```bb`b```````bb````````````````````bb`````````````````````␍````b``bbb``````b`bb``b`b``bb````````b````````````````````b``````````````````````␍````b`````b``bbbb`b```b`b```b````````bb``````````````````bb``````````````````````␍````b`b```b`b```b`b```b`b```b`````````b``````````````````b```````````````````````␍````b``bbb```bbbb`b```b``bbbb`````````bbbbbbbbbbbbbbbbbbbb```````````````````````␍````b````````````````````````````````````````````````````````````````````````````␍````bbbbbbbbbbbbbbbbbbbbbbbbbb```````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````b```````````````````````````````````````␍`````````````bbbbb`bbbbbbbbbbbbbbbbbbbbbbb```````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````bbb`````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍`````````````````````````````````````````````````````````````````````````````````␍
|
||||
Reference in new issue
Block a user