Format fixes in 2004/schnitzi + .gitignore update
The reason the top level .gitignore is updated is because this entry
will create vi swap files and it seems that the glob belongs with the
others.
For instance after running this entry numerous times over numerous days:
$ ls -1 .s*|wc -l
52
I was not aware of them until it started getting to .su like .sux and
others.
I've noted this fact in the README.md file as well, explaining to those
who don't know how they're named, how to find them (or what they're
called).
This commit is contained in:
1 parent
ed8eb093ec
commit
c2e62e4a03
2 files changed
+48
-28
No files matched your search
@@ -3,6 +3,7 @@
|
||||
*.dSYM
|
||||
.*.sv[a-z]
|
||||
.*.sw[a-z]
|
||||
.su[a-z]
|
||||
.DS_Store
|
||||
.sv[a-z]
|
||||
.sw[a-z]
|
||||
|
||||
+47
-28
@@ -1,9 +1,6 @@
|
||||
# Best Non-Use of Curses
|
||||
|
||||
Mark Schnitzius
|
||||
Eclipse Group
|
||||
94 Richardson St
|
||||
Albert Park, VIC 3206
|
||||
Australia
|
||||
<http://computronium.org/ioccc.html>
|
||||
|
||||
@@ -22,8 +19,8 @@ make
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./schnitzi <schnitzi.inp0 | vi
|
||||
./schnitzi <schnitzi.inp1 | vi
|
||||
./schnitzi <schnitzi.inp0 2>/dev/null| vi
|
||||
./schnitzi <schnitzi.inp1 2>/dev/null| vi
|
||||
```
|
||||
|
||||
For others, create an output file and use your system
|
||||
@@ -34,6 +31,18 @@ pasteboard/selection/cut buffer to "input" the output into vi:
|
||||
./schnitzi <schnitzi.inp1 >schnitzi.out1
|
||||
```
|
||||
|
||||
NOTE: if you're one of those who don't know how to exit `vi` :-) don't worry as
|
||||
it will exit for you.
|
||||
|
||||
NOTE: this entry will make vi(m) swap files in the current working directory.
|
||||
You might wish to clean them up. We could say how but lest there is another file
|
||||
that matches the glob we won't. In any event vi swap files start with a dot
|
||||
followed by the file name followed by another dot followed by `s` and two more
|
||||
letters like. If no file is opened it will not have the file name but just be
|
||||
e.g. `.swp`. When a second letter has no remaining availabilities it goes to
|
||||
another one e.g. `u`.
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
This exemplifies the meaning of Visual Editor, but we don't think
|
||||
@@ -43,7 +52,7 @@ performance of the latest hardware!
|
||||
## Author's remarks:
|
||||
|
||||
If you've ever pasted a large chunk of text into an editor (such as
|
||||
'vi') without first putting it into insert mode, or turning off
|
||||
`vi`) without first putting it into insert mode, or turning off
|
||||
the auto-indent, you know the dismay of watching your screen fill
|
||||
up with misaligned junk.
|
||||
|
||||
@@ -70,10 +79,10 @@ which appear later in the input file will be drawn in front of
|
||||
sprites which appear earlier.
|
||||
|
||||
The output, to stdout, is a string which, when pasted into vi, will
|
||||
perform the animation defined in the input. [The vi editor is a
|
||||
perform the animation defined in the input. (The vi editor is a
|
||||
common (and ancient) editor that should be available on most Unix,
|
||||
Linux, Solaris, and Mac OS X machines; you can get it on Windows
|
||||
by installing Cygwin, which is how I do it.]
|
||||
by installing Cygwin, which is how I do it.)
|
||||
|
||||
### THE INPUT
|
||||
|
||||
@@ -83,17 +92,17 @@ description of the input file format.
|
||||
|
||||
The first line is specified thusly:
|
||||
|
||||
```
|
||||
[duration] [timefactor]
|
||||
```
|
||||
|
||||
The first parameter, duration, defines how long the animation will
|
||||
run. The second, timefactor, is used as sort of a fudge factor
|
||||
for machines that run too fast to see the animation. A timefactor
|
||||
of 0 means, "run the animation as fast as you can". On a pretty
|
||||
fast machine, I've had to set it as high as 2000 to get the
|
||||
animation to slow down sufficiently. Note that the higher the
|
||||
timefactor, the longer the output string that you'll have to copy-
|
||||
and-paste, as extra characters are necessary to "waste time" between
|
||||
frames.
|
||||
The first parameter, duration, defines how long the animation will run. The
|
||||
second, `timefactor`, is used as sort of a fudge factor for machines that run
|
||||
too fast to see the animation. A `timefactor` of 0 means, "run the animation as
|
||||
fast as you can". On a pretty fast machine, I've had to set it as high as 2000
|
||||
to get the animation to slow down sufficiently. Note that the higher the
|
||||
`timefactor`, the longer the output string that you'll have to copy- and-paste,
|
||||
as extra characters are necessary to "waste time" between frames.
|
||||
|
||||
Following the first line parameters, you may have up to nine
|
||||
different sprites, each up 50 by 50 in size, and with up to four
|
||||
@@ -101,22 +110,32 @@ different 'views' of that object, which are cycled through with
|
||||
each successive frame. Each sprite begins with a line of parameters
|
||||
of the following form:
|
||||
|
||||
```
|
||||
[start] [end] [x] [y] [dx] [dy] [cols] [rows] [viewcount]
|
||||
```
|
||||
|
||||
where:
|
||||
|
||||
'start' is the time at which this sprite first appears
|
||||
'end' is the time at which it disappears
|
||||
'x' is the horizontal position at which it starts
|
||||
'y' is the vertical position
|
||||
'dx' is the amount that the x position changes per frame
|
||||
'dy' is the amount that the y position changes per frame
|
||||
'cols' is the number of columns in each view
|
||||
'rows' is the number of rows in each view
|
||||
'viewcount' is the number of views to cycle through
|
||||
- `start` is the time at which this sprite first appears.
|
||||
|
||||
Each such parameter line will be followed by 'viewcount'
|
||||
view frames, each with 'rows' rows and 'cols' columns.
|
||||
- `end` is the time at which it disappears.
|
||||
|
||||
- `x` is the horizontal position at which it starts.
|
||||
|
||||
- `y` is the vertical position.
|
||||
|
||||
- `dx` is the amount that the `x` position changes per frame.
|
||||
|
||||
- `dy` is the amount that the `y` position changes per frame.
|
||||
|
||||
- `cols` is the number of columns in each view.
|
||||
|
||||
- `rows` is the number of rows in each view.
|
||||
|
||||
- `viewcount` is the number of views to cycle through.
|
||||
|
||||
Each such parameter line will be followed by `viewcount`
|
||||
view frames, each with `rows` rows and `cols` columns.
|
||||
|
||||
Input is terminated by end of file. Duh.
|
||||
|
||||
|
||||
Reference in new issue
Block a user