home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news text
| default
| |
99%
| file
| makefile script, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 75 75 | 6e 65 74 21 69 73 6c 61 |Path: uu|net!isla|
|00000010| 6e 64 21 61 72 67 76 0a | 46 72 6f 6d 3a 20 61 72 |nd!argv.|From: ar|
|00000020| 67 76 40 69 73 6c 61 6e | 64 2e 75 75 2e 6e 65 74 |gv@islan|d.uu.net|
|00000030| 20 28 44 61 6e 20 48 65 | 6c 6c 65 72 29 0a 4e 65 | (Dan He|ller).Ne|
|00000040| 77 73 67 72 6f 75 70 73 | 3a 20 63 6f 6d 70 2e 73 |wsgroups|: comp.s|
|00000050| 6f 75 72 63 65 73 2e 78 | 0a 53 75 62 6a 65 63 74 |ources.x|.Subject|
|00000060| 3a 20 76 30 34 69 30 31 | 37 3a 20 20 78 72 6f 62 |: v04i01|7: xrob|
|00000070| 6f 74 73 2c 20 50 61 72 | 74 30 31 2f 30 31 0a 4d |ots, Par|t01/01.M|
|00000080| 65 73 73 61 67 65 2d 49 | 44 3a 20 3c 37 38 39 40 |essage-I|D: <789@|
|00000090| 69 73 6c 61 6e 64 2e 75 | 75 2e 6e 65 74 3e 0a 44 |island.u|u.net>.D|
|000000a0| 61 74 65 3a 20 34 20 4a | 75 6e 20 38 39 20 32 31 |ate: 4 J|un 89 21|
|000000b0| 3a 34 33 3a 34 39 20 47 | 4d 54 0a 4f 72 67 61 6e |:43:49 G|MT.Organ|
|000000c0| 69 7a 61 74 69 6f 6e 3a | 20 49 73 6c 61 6e 64 20 |ization:| Island |
|000000d0| 47 72 61 70 68 69 63 73 | 2c 20 4d 61 72 69 6e 20 |Graphics|, Marin |
|000000e0| 43 6f 75 6e 74 79 2c 20 | 43 61 6c 69 66 6f 72 6e |County, |Californ|
|000000f0| 69 61 0a 4c 69 6e 65 73 | 3a 20 32 34 39 33 0a 41 |ia.Lines|: 2493.A|
|00000100| 70 70 72 6f 76 65 64 3a | 20 69 73 6c 61 6e 64 21 |pproved:| island!|
|00000110| 61 72 67 76 40 73 75 6e | 2e 63 6f 6d 0a 0a 53 75 |argv@sun|.com..Su|
|00000120| 62 6d 69 74 74 65 64 2d | 62 79 3a 20 42 72 69 61 |bmitted-|by: Bria|
|00000130| 6e 20 57 61 72 6b 65 6e | 74 69 6e 65 20 3c 62 77 |n Warken|tine <bw|
|00000140| 61 72 6b 65 6e 74 40 70 | 6f 6c 79 73 6c 6f 2e 43 |arkent@p|olyslo.C|
|00000150| 61 6c 50 6f 6c 79 2e 45 | 44 55 3e 0a 50 6f 73 74 |alPoly.E|DU>.Post|
|00000160| 69 6e 67 2d 6e 75 6d 62 | 65 72 3a 20 56 6f 6c 75 |ing-numb|er: Volu|
|00000170| 6d 65 20 34 2c 20 49 73 | 73 75 65 20 31 37 0a 41 |me 4, Is|sue 17.A|
|00000180| 72 63 68 69 76 65 2d 6e | 61 6d 65 3a 20 78 72 6f |rchive-n|ame: xro|
|00000190| 62 6f 74 73 2f 70 61 72 | 74 30 31 0a 0a 5b 20 54 |bots/par|t01..[ T|
|000001a0| 68 69 73 20 69 73 20 61 | 6e 20 58 20 76 65 72 73 |his is a|n X vers|
|000001b0| 69 6f 6e 20 6f 66 20 74 | 68 65 20 63 6c 61 73 73 |ion of t|he class|
|000001c0| 69 63 20 67 61 6d 65 20 | 6f 66 20 72 6f 62 6f 74 |ic game |of robot|
|000001d0| 73 2e 20 20 46 6f 72 20 | 74 68 6f 73 65 20 6e 6f |s. For |those no|
|000001e0| 74 20 66 61 6d 69 6c 69 | 61 72 0a 20 20 77 69 74 |t famili|ar. wit|
|000001f0| 68 20 72 6f 62 6f 74 73 | 2c 20 74 68 65 20 69 64 |h robots|, the id|
|00000200| 65 61 20 69 73 20 74 68 | 61 74 20 79 6f 75 20 61 |ea is th|at you a|
|00000210| 72 65 20 63 68 61 73 65 | 64 20 62 79 20 72 6f 62 |re chase|d by rob|
|00000220| 6f 74 73 20 61 6e 64 20 | 74 68 65 20 6f 62 6a 65 |ots and |the obje|
|00000230| 63 74 20 69 73 20 74 6f | 0a 20 20 6d 61 6b 65 20 |ct is to|. make |
|00000240| 74 68 65 6d 20 63 72 61 | 73 68 20 69 6e 74 6f 20 |them cra|sh into |
|00000250| 65 61 63 68 20 6f 74 68 | 65 72 20 62 65 66 6f 72 |each oth|er befor|
|00000260| 65 20 74 68 65 79 20 67 | 65 74 20 79 6f 75 2e 20 |e they g|et you. |
|00000270| 20 54 68 69 73 20 69 73 | 20 61 20 76 65 72 79 20 | This is| a very |
|00000280| 6e 69 63 65 0a 20 20 69 | 6d 70 6c 65 6d 65 6e 74 |nice. i|mplement|
|00000290| 61 74 69 6f 6e 20 6f 66 | 20 74 68 69 73 20 67 61 |ation of| this ga|
|000002a0| 6d 65 20 2d 2d 20 69 6e | 63 72 65 64 69 62 6c 79 |me -- in|credibly|
|000002b0| 20 66 75 6e 2e 20 20 2d | 2d 61 72 67 76 20 5d 0a | fun. -|-argv ].|
|000002c0| 0a 23 21 20 2f 62 69 6e | 2f 73 68 0a 23 20 54 68 |.#! /bin|/sh.# Th|
|000002d0| 69 73 20 69 73 20 61 20 | 73 68 65 6c 6c 20 61 72 |is is a |shell ar|
|000002e0| 63 68 69 76 65 2c 20 6d | 65 61 6e 69 6e 67 3a 0a |chive, m|eaning:.|
|000002f0| 23 20 31 2e 20 52 65 6d | 6f 76 65 20 65 76 65 72 |# 1. Rem|ove ever|
|00000300| 79 74 68 69 6e 67 20 61 | 62 6f 76 65 20 74 68 65 |ything a|bove the|
|00000310| 20 23 21 20 2f 62 69 6e | 2f 73 68 20 6c 69 6e 65 | #! /bin|/sh line|
|00000320| 2e 0a 23 20 32 2e 20 53 | 61 76 65 20 74 68 65 20 |..# 2. S|ave the |
|00000330| 72 65 73 75 6c 74 69 6e | 67 20 74 65 78 74 20 69 |resultin|g text i|
|00000340| 6e 20 61 20 66 69 6c 65 | 2e 0a 23 20 33 2e 20 45 |n a file|..# 3. E|
|00000350| 78 65 63 75 74 65 20 74 | 68 65 20 66 69 6c 65 20 |xecute t|he file |
|00000360| 77 69 74 68 20 2f 62 69 | 6e 2f 73 68 20 28 6e 6f |with /bi|n/sh (no|
|00000370| 74 20 63 73 68 29 20 74 | 6f 20 63 72 65 61 74 65 |t csh) t|o create|
|00000380| 20 74 68 65 20 66 69 6c | 65 73 3a 0a 23 09 49 6d | the fil|es:.#.Im|
|00000390| 61 6b 65 66 69 6c 65 0a | 23 09 4d 61 6b 65 66 69 |akefile.|#.Makefi|
|000003a0| 6c 65 2e 6e 6f 6e 49 6d | 61 6b 65 0a 23 09 52 45 |le.nonIm|ake.#.RE|
|000003b0| 41 44 4d 45 0a 23 09 62 | 69 74 6d 61 70 73 2e 68 |ADME.#.b|itmaps.h|
|000003c0| 0a 23 09 63 61 6c 6c 62 | 61 63 6b 73 2e 63 0a 23 |.#.callb|acks.c.#|
|000003d0| 09 63 61 6c 6c 62 61 63 | 6b 73 2e 68 0a 23 09 67 |.callbac|ks.h.#.g|
|000003e0| 61 6d 65 2e 63 0a 23 09 | 67 61 6d 65 2e 68 0a 23 |ame.c.#.|game.h.#|
|000003f0| 09 67 72 61 70 68 69 63 | 73 2e 63 0a 23 09 67 72 |.graphic|s.c.#.gr|
|00000400| 61 70 68 69 63 73 2e 68 | 0a 23 09 68 65 6c 70 2e |aphics.h|.#.help.|
|00000410| 63 0a 23 09 68 65 6c 70 | 2e 68 0a 23 09 6d 61 69 |c.#.help|.h.#.mai|
|00000420| 6e 2e 63 0a 23 09 73 63 | 6f 72 65 2e 63 0a 23 09 |n.c.#.sc|ore.c.#.|
|00000430| 73 63 6f 72 65 2e 68 0a | 23 09 78 72 6f 62 6f 74 |score.h.|#.xrobot|
|00000440| 73 2e 6d 61 6e 0a 23 20 | 54 68 69 73 20 61 72 63 |s.man.# |This arc|
|00000450| 68 69 76 65 20 63 72 65 | 61 74 65 64 3a 20 54 75 |hive cre|ated: Tu|
|00000460| 65 20 4d 61 79 20 33 30 | 20 31 34 3a 31 39 3a 35 |e May 30| 14:19:5|
|00000470| 33 20 31 39 38 39 0a 65 | 78 70 6f 72 74 20 50 41 |3 1989.e|xport PA|
|00000480| 54 48 3b 20 50 41 54 48 | 3d 2f 62 69 6e 3a 24 50 |TH; PATH|=/bin:$P|
|00000490| 41 54 48 0a 65 63 68 6f | 20 73 68 61 72 3a 20 65 |ATH.echo| shar: e|
|000004a0| 78 74 72 61 63 74 69 6e | 67 20 22 27 49 6d 61 6b |xtractin|g "'Imak|
|000004b0| 65 66 69 6c 65 27 22 20 | 27 28 36 34 32 20 63 68 |efile'" |'(642 ch|
|000004c0| 61 72 61 63 74 65 72 73 | 29 27 0a 69 66 20 74 65 |aracters|)'.if te|
|000004d0| 73 74 20 2d 66 20 27 49 | 6d 61 6b 65 66 69 6c 65 |st -f 'I|makefile|
|000004e0| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|000004f0| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00000500| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00000510| 66 69 6c 65 20 22 27 49 | 6d 61 6b 65 66 69 6c 65 |file "'I|makefile|
|00000520| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00000530| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 49 6d 61 6b |SHAR_EOF| > 'Imak|
|00000540| 65 66 69 6c 65 27 0a 0a | 20 20 20 20 20 53 43 4f |efile'..| SCO|
|00000550| 52 45 5f 46 49 4c 45 20 | 3d 20 2d 44 53 43 4f 52 |RE_FILE |= -DSCOR|
|00000560| 45 5f 46 49 4c 45 3d 5c | 22 2f 75 73 72 2f 67 61 |E_FILE=\|"/usr/ga|
|00000570| 6d 65 73 2f 6c 69 62 2f | 78 72 6f 62 6f 74 73 5f |mes/lib/|xrobots_|
|00000580| 73 63 6f 72 65 73 5c 22 | 0a 20 20 20 20 20 20 4d |scores\"|. M|
|00000590| 41 58 53 43 4f 52 45 53 | 20 3d 20 2d 44 4d 41 58 |AXSCORES| = -DMAX|
|000005a0| 53 43 4f 52 45 53 3d 32 | 30 0a 20 20 20 20 20 20 |SCORES=2|0. |
|000005b0| 20 20 20 20 20 4d 41 58 | 58 20 3d 20 2d 44 4d 41 | MAX|X = -DMA|
|000005c0| 58 58 3d 33 35 0a 20 20 | 20 20 20 20 20 20 20 20 |XX=35. | |
|000005d0| 20 4d 41 58 59 20 3d 20 | 2d 44 4d 41 58 59 3d 32 | MAXY = |-DMAXY=2|
|000005e0| 30 0a 20 20 20 20 20 20 | 20 20 44 45 46 49 4e 45 |0. | DEFINE|
|000005f0| 53 20 3d 20 24 28 53 43 | 4f 52 45 5f 46 49 4c 45 |S = $(SC|ORE_FILE|
|00000600| 29 20 24 28 4d 41 58 53 | 43 4f 52 45 53 29 20 24 |) $(MAXS|CORES) $|
|00000610| 28 4d 41 58 58 29 20 24 | 28 4d 41 58 59 29 0a 0a |(MAXX) $|(MAXY)..|
|00000620| 20 20 20 20 20 20 20 20 | 20 20 20 53 52 43 53 20 | | SRCS |
|00000630| 3d 20 63 61 6c 6c 62 61 | 63 6b 73 2e 63 20 67 61 |= callba|cks.c ga|
|00000640| 6d 65 2e 63 20 67 72 61 | 70 68 69 63 73 2e 63 20 |me.c gra|phics.c |
|00000650| 6d 61 69 6e 2e 63 20 73 | 63 6f 72 65 2e 63 20 68 |main.c s|core.c h|
|00000660| 65 6c 70 2e 63 0a 20 20 | 20 20 20 20 20 20 20 20 |elp.c. | |
|00000670| 20 4f 42 4a 53 20 3d 20 | 63 61 6c 6c 62 61 63 6b | OBJS = |callback|
|00000680| 73 2e 6f 20 67 61 6d 65 | 2e 6f 20 67 72 61 70 68 |s.o game|.o graph|
|00000690| 69 63 73 2e 6f 20 6d 61 | 69 6e 2e 6f 20 73 63 6f |ics.o ma|in.o sco|
|000006a0| 72 65 2e 6f 20 68 65 6c | 70 2e 6f 0a 0a 20 20 20 |re.o hel|p.o.. |
|000006b0| 20 20 20 20 49 4e 43 4c | 55 44 45 53 20 3d 20 2d | INCL|UDES = -|
|000006c0| 49 24 28 54 4f 50 29 20 | 2d 49 24 28 54 4f 4f 4c |I$(TOP) |-I$(TOOL|
|000006d0| 4b 49 54 53 52 43 29 0a | 4c 4f 43 41 4c 5f 4c 49 |KITSRC).|LOCAL_LI|
|000006e0| 42 52 41 52 49 45 53 20 | 3d 20 24 28 58 41 57 4c |BRARIES |= $(XAWL|
|000006f0| 49 42 29 20 24 28 58 4d | 55 4c 49 42 29 20 24 28 |IB) $(XM|ULIB) $(|
|00000700| 58 54 4f 4f 4c 4c 49 42 | 29 20 24 28 58 4c 49 42 |XTOOLLIB|) $(XLIB|
|00000710| 29 20 2d 6c 6d 0a 0a 0a | 61 6c 6c 3a 3a 20 78 72 |) -lm...|all:: xr|
|00000720| 6f 62 6f 74 73 0a 0a 43 | 6f 6d 70 6c 65 78 50 72 |obots..C|omplexPr|
|00000730| 6f 67 72 61 6d 54 61 72 | 67 65 74 28 78 72 6f 62 |ogramTar|get(xrob|
|00000740| 6f 74 73 29 0a 2f 2a 0a | 20 2a 20 20 54 68 65 20 |ots)./*.| * The |
|00000750| 66 6f 6c 6c 6f 77 69 6e | 67 20 69 73 20 61 20 6d |followin|g is a m|
|00000760| 61 74 74 65 72 20 6f 66 | 20 70 72 65 66 65 72 65 |atter of| prefere|
|00000770| 6e 63 65 3a 0a 20 2a 0a | 20 2a 20 20 49 6e 73 74 |nce:. *.| * Inst|
|00000780| 61 6c 6c 4d 61 6e 50 61 | 67 65 28 78 72 6f 62 6f |allManPa|ge(xrobo|
|00000790| 74 73 2c 24 28 4d 41 4e | 44 49 52 29 29 0a 20 2a |ts,$(MAN|DIR)). *|
|000007a0| 20 20 49 6e 73 74 61 6c | 6c 50 72 6f 67 72 61 6d | Instal|lProgram|
|000007b0| 28 78 72 6f 62 6f 74 73 | 2c 24 28 42 49 4e 44 49 |(xrobots|,$(BINDI|
|000007c0| 52 29 29 0a 20 2a 2f 0a | 0a 53 48 41 52 5f 45 4f |R)). */.|.SHAR_EO|
|000007d0| 46 0a 69 66 20 74 65 73 | 74 20 36 34 32 20 2d 6e |F.if tes|t 642 -n|
|000007e0| 65 20 22 60 77 63 20 2d | 63 20 3c 20 27 49 6d 61 |e "`wc -|c < 'Ima|
|000007f0| 6b 65 66 69 6c 65 27 60 | 22 0a 74 68 65 6e 0a 09 |kefile'`|".then..|
|00000800| 65 63 68 6f 20 73 68 61 | 72 3a 20 65 72 72 6f 72 |echo sha|r: error|
|00000810| 20 74 72 61 6e 73 6d 69 | 74 74 69 6e 67 20 22 27 | transmi|tting "'|
|00000820| 49 6d 61 6b 65 66 69 6c | 65 27 22 20 27 28 73 68 |Imakefil|e'" '(sh|
|00000830| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 36 |ould hav|e been 6|
|00000840| 34 32 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |42 chara|cters)'.|
|00000850| 66 69 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |fi.fi # |end of o|
|00000860| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|00000870| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|00000880| 61 63 74 69 6e 67 20 22 | 27 4d 61 6b 65 66 69 6c |acting "|'Makefil|
|00000890| 65 2e 6e 6f 6e 49 6d 61 | 6b 65 27 22 20 27 28 31 |e.nonIma|ke'" '(1|
|000008a0| 30 39 32 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |092 char|acters)'|
|000008b0| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 4d 61 6b |.if test| -f 'Mak|
|000008c0| 65 66 69 6c 65 2e 6e 6f | 6e 49 6d 61 6b 65 27 0a |efile.no|nImake'.|
|000008d0| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|000008e0| 20 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 | will no|t over-w|
|000008f0| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00000900| 6c 65 20 22 27 4d 61 6b | 65 66 69 6c 65 2e 6e 6f |le "'Mak|efile.no|
|00000910| 6e 49 6d 61 6b 65 27 22 | 0a 65 6c 73 65 0a 63 61 |nImake'"|.else.ca|
|00000920| 74 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |t << \SH|AR_EOF >|
|00000930| 20 27 4d 61 6b 65 66 69 | 6c 65 2e 6e 6f 6e 49 6d | 'Makefi|le.nonIm|
|00000940| 61 6b 65 27 0a 0a 23 20 | 20 46 6f 72 20 74 68 6f |ake'..# | For tho|
|00000950| 73 65 20 6f 66 20 75 73 | 20 77 68 6f 20 61 72 65 |se of us| who are|
|00000960| 20 73 74 69 6c 6c 20 63 | 6f 6e 66 75 73 65 64 20 | still c|onfused |
|00000970| 62 79 20 49 6d 61 6b 65 | 2c 0a 23 20 20 74 68 69 |by Imake|,.# thi|
|00000980| 73 20 6d 61 6b 65 66 69 | 6c 65 20 69 73 20 6e 6f |s makefi|le is no|
|00000990| 74 20 69 74 73 20 6f 66 | 66 73 70 72 69 6e 67 2e |t its of|fspring.|
|000009a0| 20 20 3a 2d 29 0a 0a 0a | 20 20 20 20 20 20 20 20 | :-)...| |
|000009b0| 54 41 53 4b 09 09 3d 20 | 78 72 6f 62 6f 74 73 0a |TASK..= |xrobots.|
|000009c0| 23 20 20 20 20 20 20 20 | 54 41 53 4b 09 09 3d 20 |# |TASK..= |
|000009d0| 2f 75 73 72 2f 67 61 6d | 65 73 2f 78 72 6f 62 6f |/usr/gam|es/xrobo|
|000009e0| 74 73 0a 0a 20 20 20 20 | 20 20 20 20 53 43 4f 52 |ts.. | SCOR|
|000009f0| 45 5f 46 49 4c 45 09 3d | 20 2d 44 53 43 4f 52 45 |E_FILE.=| -DSCORE|
|00000a00| 5f 46 49 4c 45 3d 5c 22 | 2f 75 73 72 2f 67 61 6d |_FILE=\"|/usr/gam|
|00000a10| 65 73 2f 6c 69 62 2f 78 | 72 6f 62 6f 74 73 5f 73 |es/lib/x|robots_s|
|00000a20| 63 6f 72 65 73 5c 22 0a | 20 20 20 20 20 20 20 20 |cores\".| |
|00000a30| 4d 41 58 53 43 4f 52 45 | 53 09 3d 20 2d 44 4d 41 |MAXSCORE|S.= -DMA|
|00000a40| 58 53 43 4f 52 45 53 3d | 32 30 0a 20 20 20 20 20 |XSCORES=|20. |
|00000a50| 20 20 20 4d 41 58 58 09 | 09 3d 20 2d 44 4d 41 58 | MAXX.|.= -DMAX|
|00000a60| 58 3d 33 35 0a 20 20 20 | 20 20 20 20 20 4d 41 58 |X=35. | MAX|
|00000a70| 59 09 09 3d 20 2d 44 4d | 41 58 59 3d 32 30 0a 0a |Y..= -DM|AXY=20..|
|00000a80| 20 20 20 20 20 20 20 20 | 44 45 46 49 4e 45 53 09 | |DEFINES.|
|00000a90| 09 3d 20 24 28 53 43 4f | 52 45 5f 46 49 4c 45 29 |.= $(SCO|RE_FILE)|
|00000aa0| 20 24 28 4d 41 58 53 43 | 4f 52 45 53 29 20 24 28 | $(MAXSC|ORES) $(|
|00000ab0| 4d 41 58 58 29 20 24 28 | 4d 41 58 59 29 0a 0a 20 |MAXX) $(|MAXY).. |
|00000ac0| 20 20 20 20 20 20 20 49 | 4e 43 44 49 52 09 09 3d | I|NCDIR..=|
|00000ad0| 20 2f 75 73 72 2f 6c 6f | 63 61 6c 2f 69 6e 63 6c | /usr/lo|cal/incl|
|00000ae0| 75 64 65 0a 20 20 20 20 | 20 20 20 20 4c 49 42 44 |ude. | LIBD|
|00000af0| 49 52 09 09 3d 20 2f 75 | 73 72 2f 6c 6f 63 61 6c |IR..= /u|sr/local|
|00000b00| 2f 6c 69 62 0a 20 20 20 | 20 20 20 20 20 4c 49 42 |/lib. | LIB|
|00000b10| 53 09 09 3d 20 2d 6c 58 | 61 77 20 2d 6c 58 74 20 |S..= -lX|aw -lXt |
|00000b20| 2d 6c 58 6d 75 20 2d 6c | 58 31 31 20 2d 6c 6d 0a |-lXmu -l|X11 -lm.|
|00000b30| 0a 20 20 20 20 20 20 20 | 20 44 42 58 46 4c 41 47 |. | DBXFLAG|
|00000b40| 53 09 3d 20 0a 20 20 20 | 20 20 20 20 20 43 46 4c |S.= . | CFL|
|00000b50| 41 47 53 09 09 3d 20 24 | 28 44 42 58 46 4c 41 47 |AGS..= $|(DBXFLAG|
|00000b60| 53 29 20 2d 49 24 28 49 | 4e 43 44 49 52 29 20 24 |S) -I$(I|NCDIR) $|
|00000b70| 28 44 45 46 49 4e 45 53 | 29 0a 20 20 20 20 20 20 |(DEFINES|). |
|00000b80| 20 20 4c 44 46 4c 41 47 | 53 09 09 3d 20 24 28 44 | LDFLAG|S..= $(D|
|00000b90| 42 58 46 4c 41 47 53 29 | 20 2d 4c 24 28 4c 49 42 |BXFLAGS)| -L$(LIB|
|00000ba0| 44 49 52 29 20 24 28 4c | 49 42 53 29 0a 0a 20 20 |DIR) $(L|IBS).. |
|00000bb0| 20 20 20 20 20 20 43 46 | 49 4c 45 53 09 09 3d 20 | CF|ILES..= |
|00000bc0| 6d 61 69 6e 2e 63 20 67 | 61 6d 65 2e 63 20 63 61 |main.c g|ame.c ca|
|00000bd0| 6c 6c 62 61 63 6b 73 2e | 63 20 67 72 61 70 68 69 |llbacks.|c graphi|
|00000be0| 63 73 2e 63 20 73 63 6f | 72 65 2e 63 20 68 65 6c |cs.c sco|re.c hel|
|00000bf0| 70 2e 63 0a 20 20 20 20 | 20 20 20 20 4f 42 4a 45 |p.c. | OBJE|
|00000c00| 43 54 53 09 09 3d 20 6d | 61 69 6e 2e 6f 20 67 61 |CTS..= m|ain.o ga|
|00000c10| 6d 65 2e 6f 20 63 61 6c | 6c 62 61 63 6b 73 2e 6f |me.o cal|lbacks.o|
|00000c20| 20 67 72 61 70 68 69 63 | 73 2e 6f 20 73 63 6f 72 | graphic|s.o scor|
|00000c30| 65 2e 6f 20 68 65 6c 70 | 2e 6f 0a 20 20 20 20 20 |e.o help|.o. |
|00000c40| 20 20 20 49 4e 43 4c 55 | 44 45 53 09 3d 20 67 61 | INCLU|DES.= ga|
|00000c50| 6d 65 2e 68 20 67 72 61 | 70 68 69 63 73 2e 68 20 |me.h gra|phics.h |
|00000c60| 62 69 74 6d 61 70 73 2e | 68 20 73 63 6f 72 65 2e |bitmaps.|h score.|
|00000c70| 68 20 68 65 6c 70 2e 68 | 0a 0a 64 65 66 61 75 6c |h help.h|..defaul|
|00000c80| 74 3a 20 24 28 54 41 53 | 4b 29 20 0a 20 0a 24 28 |t: $(TAS|K) . .$(|
|00000c90| 54 41 53 4b 29 3a 20 24 | 28 4f 42 4a 45 43 54 53 |TASK): $|(OBJECTS|
|00000ca0| 29 20 24 28 49 4e 43 4c | 55 44 45 53 29 20 0a 09 |) $(INCL|UDES) ..|
|00000cb0| 63 63 20 2d 6f 20 24 40 | 20 24 28 4f 42 4a 45 43 |cc -o $@| $(OBJEC|
|00000cc0| 54 53 29 20 24 28 4c 44 | 46 4c 41 47 53 29 20 0a |TS) $(LD|FLAGS) .|
|00000cd0| 0a 2e 63 2e 6f 3a 0a 09 | 63 63 20 2d 63 20 24 2a |..c.o:..|cc -c $*|
|00000ce0| 2e 63 20 24 28 43 46 4c | 41 47 53 29 20 0a 0a 74 |.c $(CFL|AGS) ..t|
|00000cf0| 61 67 73 3a 20 24 28 43 | 46 49 4c 45 53 29 20 24 |ags: $(C|FILES) $|
|00000d00| 28 49 4e 43 4c 55 44 45 | 53 29 0a 09 63 74 61 67 |(INCLUDE|S)..ctag|
|00000d10| 73 20 2d 74 20 24 28 49 | 4e 43 4c 55 44 45 53 29 |s -t $(I|NCLUDES)|
|00000d20| 20 24 28 43 46 49 4c 45 | 53 29 0a 0a 6c 69 6e 74 | $(CFILE|S)..lint|
|00000d30| 3a 20 0a 09 6c 69 6e 74 | 20 2d 49 24 28 49 4e 43 |: ..lint| -I$(INC|
|00000d40| 44 49 52 29 20 24 28 43 | 46 49 4c 45 53 29 0a 0a |DIR) $(C|FILES)..|
|00000d50| 6d 61 6e 3a 3a 0a 09 6e | 72 6f 66 66 20 2d 6d 61 |man::..n|roff -ma|
|00000d60| 6e 20 78 72 6f 62 6f 74 | 73 2e 6d 61 6e 0a 0a 63 |n xrobot|s.man..c|
|00000d70| 6c 65 61 6e 3a 3a 0a 09 | 72 6d 20 2d 66 20 24 28 |lean::..|rm -f $(|
|00000d80| 4f 42 4a 45 43 54 53 29 | 0a 53 48 41 52 5f 45 4f |OBJECTS)|.SHAR_EO|
|00000d90| 46 0a 69 66 20 74 65 73 | 74 20 31 30 39 32 20 2d |F.if tes|t 1092 -|
|00000da0| 6e 65 20 22 60 77 63 20 | 2d 63 20 3c 20 27 4d 61 |ne "`wc |-c < 'Ma|
|00000db0| 6b 65 66 69 6c 65 2e 6e | 6f 6e 49 6d 61 6b 65 27 |kefile.n|onImake'|
|00000dc0| 60 22 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |`".then.|.echo sh|
|00000dd0| 61 72 3a 20 65 72 72 6f | 72 20 74 72 61 6e 73 6d |ar: erro|r transm|
|00000de0| 69 74 74 69 6e 67 20 22 | 27 4d 61 6b 65 66 69 6c |itting "|'Makefil|
|00000df0| 65 2e 6e 6f 6e 49 6d 61 | 6b 65 27 22 20 27 28 73 |e.nonIma|ke'" '(s|
|00000e00| 68 6f 75 6c 64 20 68 61 | 76 65 20 62 65 65 6e 20 |hould ha|ve been |
|00000e10| 31 30 39 32 20 63 68 61 | 72 61 63 74 65 72 73 29 |1092 cha|racters)|
|00000e20| 27 0a 66 69 0a 66 69 20 | 23 20 65 6e 64 20 6f 66 |'.fi.fi |# end of|
|00000e30| 20 6f 76 65 72 77 72 69 | 74 69 6e 67 20 63 68 65 | overwri|ting che|
|00000e40| 63 6b 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 65 78 |ck.echo |shar: ex|
|00000e50| 74 72 61 63 74 69 6e 67 | 20 22 27 52 45 41 44 4d |tracting| "'READM|
|00000e60| 45 27 22 20 27 28 32 35 | 31 30 20 63 68 61 72 61 |E'" '(25|10 chara|
|00000e70| 63 74 65 72 73 29 27 0a | 69 66 20 74 65 73 74 20 |cters)'.|if test |
|00000e80| 2d 66 20 27 52 45 41 44 | 4d 45 27 0a 74 68 65 6e |-f 'READ|ME'.then|
|00000e90| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 77 69 6c |..echo s|har: wil|
|00000ea0| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|00000eb0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 22 | existin|g file "|
|00000ec0| 27 52 45 41 44 4d 45 27 | 22 0a 65 6c 73 65 0a 63 |'README'|".else.c|
|00000ed0| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|00000ee0| 3e 20 27 52 45 41 44 4d | 45 27 0a 0a 52 45 41 44 |> 'READM|E'..READ|
|00000ef0| 4d 45 20 2d 2d 20 78 72 | 6f 62 6f 74 73 20 76 65 |ME -- xr|obots ve|
|00000f00| 72 73 69 6f 6e 20 31 2e | 30 20 2d 2d 20 54 68 75 |rsion 1.|0 -- Thu|
|00000f10| 20 4d 61 79 20 32 35 20 | 31 33 3a 32 33 3a 34 39 | May 25 |13:23:49|
|00000f20| 20 50 44 54 20 31 39 38 | 39 0a 0a 20 20 78 72 6f | PDT 198|9.. xro|
|00000f30| 62 6f 74 73 20 69 73 20 | 61 20 67 61 6d 65 20 74 |bots is |a game t|
|00000f40| 68 61 74 20 72 75 6e 73 | 20 6f 6e 20 58 20 57 69 |hat runs| on X Wi|
|00000f50| 6e 64 6f 77 73 2e 20 20 | 49 74 20 69 73 20 62 61 |ndows. |It is ba|
|00000f60| 73 65 64 20 6f 6e 20 2f | 75 73 72 2f 67 61 6d 65 |sed on /|usr/game|
|00000f70| 73 2f 72 6f 62 6f 74 73 | 20 0a 61 6e 64 20 6f 6e |s/robots| .and on|
|00000f80| 20 54 68 65 20 4e 65 77 | 20 44 61 6c 65 6b 73 20 | The New| Daleks |
|00000f90| 28 4d 61 63 69 6e 74 6f | 73 68 29 2e 20 20 54 6f |(Macinto|sh). To|
|00000fa0| 20 63 72 65 61 74 65 20 | 61 20 72 75 6e 6e 61 62 | create |a runnab|
|00000fb0| 6c 65 20 62 69 6e 61 72 | 79 2c 20 74 79 70 65 20 |le binar|y, type |
|00000fc0| 0a 09 6d 61 6b 65 20 2d | 66 20 4d 61 6b 65 66 69 |..make -|f Makefi|
|00000fd0| 6c 65 2e 6e 6f 6e 49 6d | 61 6b 65 0a 41 6e 20 49 |le.nonIm|ake.An I|
|00000fe0| 6d 61 6b 65 66 69 6c 65 | 20 69 73 20 61 6c 73 6f |makefile| is also|
|00000ff0| 20 69 6e 63 6c 75 64 65 | 64 2e 0a 20 20 0a 43 6f | include|d.. .Co|
|00001000| 6d 70 69 6c 65 20 74 69 | 6d 65 20 70 61 72 61 6d |mpile ti|me param|
|00001010| 65 74 65 72 73 3a 20 20 | 0a 20 09 20 20 4d 41 58 |eters: |. . MAX|
|00001020| 58 2c 20 4d 41 58 59 20 | 2d 2d 20 74 68 65 73 65 |X, MAXY |-- these|
|00001030| 20 63 6f 6e 74 72 6f 6c | 20 74 68 65 20 6e 75 6d | control| the num|
|00001040| 62 65 72 20 6f 66 20 27 | 63 65 6c 6c 73 27 20 69 |ber of '|cells' i|
|00001050| 6e 20 74 68 65 20 70 6c | 61 79 66 69 65 6c 64 2e |n the pl|ayfield.|
|00001060| 0a 20 09 74 68 65 20 64 | 65 66 61 75 6c 74 20 69 |. .the d|efault i|
|00001070| 73 20 33 35 78 32 30 2e | 20 20 54 68 65 20 72 65 |s 35x20.| The re|
|00001080| 61 6c 69 73 74 69 63 20 | 6d 61 78 69 6d 75 6d 20 |alistic |maximum |
|00001090| 74 68 65 73 65 20 63 61 | 6e 20 62 65 20 6f 6e 20 |these ca|n be on |
|000010a0| 61 20 0a 20 09 31 31 35 | 32 78 39 30 30 20 73 63 |a . .115|2x900 sc|
|000010b0| 72 65 65 6e 20 28 69 65 | 20 6d 6f 73 74 20 73 75 |reen (ie| most su|
|000010c0| 6e 20 33 2f 35 30 27 73 | 29 20 69 73 20 61 62 6f |n 3/50's|) is abo|
|000010d0| 75 74 20 35 30 78 34 30 | 2e 20 20 57 69 74 68 20 |ut 50x40|. With |
|000010e0| 61 20 6c 61 72 67 65 72 | 20 0a 20 09 70 6c 61 79 |a larger| . .play|
|000010f0| 66 69 65 6c 64 2c 20 74 | 68 65 20 73 63 6f 72 65 |field, t|he score|
|00001100| 73 20 77 69 6c 6c 20 62 | 65 20 68 69 67 68 65 72 |s will b|e higher|
|00001110| 20 61 6e 64 20 74 68 65 | 20 67 61 6d 65 20 6c 65 | and the| game le|
|00001120| 6e 67 74 68 20 6c 6f 6e | 67 65 72 2c 20 62 75 74 |ngth lon|ger, but|
|00001130| 0a 20 09 73 6f 6d 65 20 | 67 72 61 70 68 69 63 73 |. .some |graphics|
|00001140| 20 77 69 6c 6c 20 61 70 | 70 65 61 72 20 73 6c 6f | will ap|pear slo|
|00001150| 77 65 72 2e 20 20 49 27 | 64 20 62 65 20 69 6e 74 |wer. I'|d be int|
|00001160| 65 72 65 73 74 65 64 20 | 74 6f 20 73 65 65 20 74 |erested |to see t|
|00001170| 68 69 73 20 0a 20 09 72 | 75 6e 6e 69 6e 67 20 6f |his . .r|unning o|
|00001180| 6e 20 61 20 62 69 67 67 | 65 72 20 65 6e 67 69 6e |n a bigg|er engin|
|00001190| 65 20 74 6f 20 73 65 65 | 20 74 68 65 20 65 66 66 |e to see| the eff|
|000011a0| 65 63 74 73 2e 20 20 57 | 69 74 68 20 61 20 33 35 |ects. W|ith a 35|
|000011b0| 78 32 30 20 0a 20 09 70 | 6c 61 79 66 69 65 6c 64 |x20 . .p|layfield|
|000011c0| 2c 20 73 63 6f 72 65 73 | 20 69 6e 20 74 68 65 20 |, scores| in the |
|000011d0| 36 30 30 30 20 72 61 6e | 67 65 20 63 61 6e 20 62 |6000 ran|ge can b|
|000011e0| 65 20 61 63 68 69 65 76 | 65 64 2e 0a 0a 20 09 20 |e achiev|ed... . |
|000011f0| 20 4d 41 58 53 43 4f 52 | 45 53 20 2d 2d 20 74 68 | MAXSCOR|ES -- th|
|00001200| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 68 69 67 68 |e number| of high|
|00001210| 20 73 63 6f 72 65 73 20 | 74 68 61 74 20 79 6f 75 | scores |that you|
|00001220| 20 77 61 6e 74 20 74 6f | 20 6b 65 65 70 2e 0a 20 | want to| keep.. |
|00001230| 09 54 68 65 20 64 65 66 | 61 75 6c 74 20 69 73 20 |.The def|ault is |
|00001240| 32 30 2e 0a 0a 20 09 20 | 20 54 68 65 20 64 65 66 |20... . | The def|
|00001250| 61 75 6c 74 73 20 66 6f | 72 20 74 68 65 20 62 69 |aults fo|r the bi|
|00001260| 6e 61 72 79 20 69 73 20 | 2f 75 73 72 2f 67 61 6d |nary is |/usr/gam|
|00001270| 65 73 2f 78 72 6f 62 6f | 74 73 20 61 6e 64 20 74 |es/xrobo|ts and t|
|00001280| 68 65 20 73 63 6f 72 65 | 0a 20 09 66 69 6c 65 20 |he score|. .file |
|00001290| 69 73 20 2f 75 73 72 2f | 67 61 6d 65 73 2f 6c 69 |is /usr/|games/li|
|000012a0| 62 2f 78 72 6f 62 6f 74 | 73 5f 73 63 6f 72 65 73 |b/xrobot|s_scores|
|000012b0| 2e 20 20 54 68 65 20 62 | 69 6e 61 72 79 20 73 68 |. The b|inary sh|
|000012c0| 6f 75 6c 64 20 68 61 76 | 65 0a 20 09 77 72 69 74 |ould hav|e. .writ|
|000012d0| 65 20 61 63 63 65 73 73 | 20 74 6f 20 74 68 65 20 |e access| to the |
|000012e0| 68 69 67 68 20 73 63 6f | 72 65 20 66 69 6c 65 20 |high sco|re file |
|000012f0| 28 78 72 6f 62 6f 74 73 | 20 77 69 6c 6c 20 61 74 |(xrobots| will at|
|00001300| 74 65 6d 70 74 20 74 6f | 20 0a 20 09 63 72 65 61 |tempt to| . .crea|
|00001310| 74 65 20 74 68 69 73 20 | 69 74 73 65 6c 66 29 2e |te this |itself).|
|00001320| 20 20 0a 0a 20 20 54 68 | 65 72 65 20 69 73 20 61 | .. Th|ere is a|
|00001330| 20 6c 69 74 74 6c 65 20 | 62 73 64 2d 69 73 68 20 | little |bsd-ish |
|00001340| 73 74 75 66 66 20 69 6e | 20 73 63 6f 72 65 2e 63 |stuff in| score.c|
|00001350| 2e 20 20 66 6c 6f 63 6b | 20 69 73 20 75 73 65 64 |. flock| is used|
|00001360| 20 74 6f 20 73 74 6f 70 | 20 61 20 72 61 63 65 20 | to stop| a race |
|00001370| 0a 63 6f 6e 64 69 74 69 | 6f 6e 2e 20 20 49 66 20 |.conditi|on. If |
|00001380| 79 6f 75 20 64 6f 6e 27 | 74 20 68 61 76 65 20 61 |you don'|t have a|
|00001390| 20 62 73 64 2d 6c 69 6b | 65 20 66 6c 6f 63 6b 2c | bsd-lik|e flock,|
|000013a0| 20 79 6f 75 20 63 6f 75 | 6c 64 20 70 72 6f 62 61 | you cou|ld proba|
|000013b0| 62 6c 79 20 0a 63 6f 6d | 6d 65 6e 74 20 69 74 20 |bly .com|ment it |
|000013c0| 6f 75 74 2e 20 20 54 68 | 65 20 72 61 63 65 20 63 |out. Th|e race c|
|000013d0| 6f 6e 64 69 74 69 6f 6e | 20 28 6d 75 6c 74 69 70 |ondition| (multip|
|000013e0| 6c 65 20 75 73 65 72 73 | 20 77 72 69 74 69 6e 67 |le users| writing|
|000013f0| 20 74 6f 20 74 68 65 20 | 0a 73 63 6f 72 65 20 66 | to the |.score f|
|00001400| 69 6c 65 29 20 69 73 20 | 70 72 6f 62 61 62 6c 79 |ile) is |probably|
|00001410| 20 72 61 72 65 2e 0a 0a | 20 20 78 72 6f 62 6f 74 | rare...| xrobot|
|00001420| 73 20 68 61 73 20 62 65 | 65 6e 20 74 65 73 74 65 |s has be|en teste|
|00001430| 64 20 6f 6e 20 53 75 6e | 20 33 2f 35 30 27 73 20 |d on Sun| 3/50's |
|00001440| 33 2f 36 30 27 73 20 33 | 2f 32 38 30 27 73 20 72 |3/60's 3|/280's r|
|00001450| 75 6e 6e 69 6e 67 20 74 | 68 65 20 58 31 31 52 33 |unning t|he X11R3|
|00001460| 0a 73 65 72 76 65 72 2e | 20 20 41 6c 73 6f 2c 20 |.server.| Also, |
|00001470| 69 74 20 68 61 73 20 62 | 65 65 6e 20 63 6f 6d 70 |it has b|een comp|
|00001480| 69 6c 65 64 20 61 6e 64 | 20 74 65 73 74 65 64 20 |iled and| tested |
|00001490| 6f 6e 20 61 20 50 79 72 | 61 6d 69 64 20 72 75 6e |on a Pyr|amid run|
|000014a0| 6e 69 6e 67 20 58 31 31 | 52 32 2e 20 0a 28 59 6f |ning X11|R2. .(Yo|
|000014b0| 75 27 6c 6c 20 68 61 76 | 65 20 74 6f 20 63 6f 6d |u'll hav|e to com|
|000014c0| 6d 65 6e 74 20 6f 75 74 | 20 74 68 65 20 72 65 66 |ment out| the ref|
|000014d0| 65 72 65 6e 63 65 73 20 | 74 6f 20 58 74 4e 72 65 |erences |to XtNre|
|000014e0| 73 69 7a 65 20 69 6e 20 | 73 63 6f 72 65 2e 63 20 |size in |score.c |
|000014f0| 69 66 20 79 6f 75 20 0a | 77 61 6e 74 20 69 74 20 |if you .|want it |
|00001500| 74 6f 20 63 6f 6d 70 69 | 6c 65 20 75 6e 64 65 72 |to compi|le under|
|00001510| 20 72 65 6c 65 61 73 65 | 20 32 2e 29 0a 0a 42 55 | release| 2.)..BU|
|00001520| 47 53 0a 0a 20 20 54 68 | 65 20 6d 61 6e 20 70 61 |GS.. Th|e man pa|
|00001530| 67 65 20 64 6f 65 73 6e | 27 74 20 69 6e 73 74 61 |ge doesn|'t insta|
|00001540| 6c 6c 20 62 79 20 64 65 | 66 61 75 6c 74 2e 20 20 |ll by de|fault. |
|00001550| 59 6f 75 27 6c 6c 20 68 | 61 76 65 20 74 6f 20 64 |You'll h|ave to d|
|00001560| 6f 20 74 68 61 74 20 79 | 6f 75 72 73 65 6c 66 2c |o that y|ourself,|
|00001570| 0a 6f 72 20 69 66 20 79 | 6f 75 20 61 72 65 20 75 |.or if y|ou are u|
|00001580| 73 69 6e 67 20 69 6d 61 | 6b 65 2c 20 6a 75 73 74 |sing ima|ke, just|
|00001590| 20 72 65 6d 6f 76 65 20 | 74 68 65 20 63 6f 6d 6d | remove |the comm|
|000015a0| 65 6e 74 73 20 66 72 6f | 6d 20 74 68 65 20 74 61 |ents fro|m the ta|
|000015b0| 69 6c 20 6f 66 20 74 68 | 65 0a 49 6d 61 6b 65 66 |il of th|e.Imakef|
|000015c0| 69 6c 65 2e 0a 0a 20 20 | 4e 6f 6e 65 20 6b 6e 6f |ile... |None kno|
|000015d0| 77 6e 2e 20 20 54 68 65 | 72 65 20 69 73 20 61 20 |wn. The|re is a |
|000015e0| 6e 61 73 74 79 20 62 75 | 67 20 69 6e 20 74 68 65 |nasty bu|g in the|
|000015f0| 20 61 77 6d 20 77 69 6e | 64 6f 77 20 6d 61 6e 61 | awm win|dow mana|
|00001600| 67 65 72 0a 74 68 61 74 | 20 63 61 75 73 65 73 20 |ger.that| causes |
|00001610| 6b 65 79 70 72 65 73 73 | 20 65 76 65 6e 74 73 20 |keypress| events |
|00001620| 74 6f 20 62 65 20 69 67 | 6e 6f 72 65 64 2e 20 20 |to be ig|nored. |
|00001630| 49 74 20 73 68 6f 77 73 | 20 75 70 20 6e 6f 77 20 |It shows| up now |
|00001640| 61 6e 64 20 74 68 65 6e | 2e 2e 2e 0a 72 61 74 68 |and then|....rath|
|00001650| 65 72 20 74 68 61 6e 20 | 63 6f 64 65 20 61 72 6f |er than |code aro|
|00001660| 75 6e 64 20 69 74 2c 20 | 49 20 70 72 65 66 65 72 |und it, |I prefer|
|00001670| 20 61 6e 6f 74 68 65 72 | 20 77 69 6e 64 6f 77 20 | another| window |
|00001680| 6d 61 6e 61 67 65 72 2e | 0a 0a 2d 2d 2d 2d 2d 0a |manager.|..-----.|
|00001690| 0a 54 68 69 73 20 69 6e | 73 6f 6d 6e 69 61 20 6b |.This in|somnia k|
|000016a0| 69 6c 6c 65 72 20 77 61 | 73 20 77 72 69 74 74 65 |iller wa|s writte|
|000016b0| 6e 20 62 79 3a 0a 20 20 | 42 72 69 61 6e 20 57 61 |n by:. |Brian Wa|
|000016c0| 72 6b 65 6e 74 69 6e 65 | 20 28 62 77 61 72 6b 65 |rkentine| (bwarke|
|000016d0| 6e 74 40 70 6f 6c 79 73 | 6c 6f 2e 43 61 6c 50 6f |nt@polys|lo.CalPo|
|000016e0| 6c 79 2e 45 44 55 29 2e | 0a 0a 20 50 65 72 6d 69 |ly.EDU).|.. Permi|
|000016f0| 73 73 69 6f 6e 20 74 6f | 20 75 73 65 2c 20 63 6f |ssion to| use, co|
|00001700| 70 79 2c 20 6d 6f 64 69 | 66 79 20 61 6e 64 20 64 |py, modi|fy and d|
|00001710| 69 73 74 72 69 62 75 74 | 65 20 28 77 69 74 68 6f |istribut|e (witho|
|00001720| 75 74 20 63 68 61 72 67 | 65 29 20 74 68 69 73 0a |ut charg|e) this.|
|00001730| 20 20 20 73 6f 66 74 77 | 61 72 65 2c 20 64 6f 63 | softw|are, doc|
|00001740| 75 6d 65 6e 74 61 74 69 | 6f 6e 2c 20 69 6d 61 67 |umentati|on, imag|
|00001750| 65 73 2c 20 65 74 63 2e | 20 69 73 20 67 72 61 6e |es, etc.| is gran|
|00001760| 74 65 64 2c 20 70 72 6f | 76 69 64 65 64 20 74 68 |ted, pro|vided th|
|00001770| 61 74 20 74 68 69 73 20 | 0a 20 20 20 63 6f 6d 6d |at this |. comm|
|00001780| 65 6e 74 20 61 6e 64 20 | 74 68 65 20 61 75 74 68 |ent and |the auth|
|00001790| 6f 72 27 73 20 6e 61 6d | 65 20 69 73 20 72 65 74 |or's nam|e is ret|
|000017a0| 61 69 6e 65 64 2e 20 20 | 54 68 65 20 61 75 74 68 |ained. |The auth|
|000017b0| 6f 72 20 61 73 73 75 6d | 65 73 20 6e 6f 20 0a 20 |or assum|es no . |
|000017c0| 20 20 72 65 73 70 6f 6e | 73 69 62 69 6c 69 74 79 | respon|sibility|
|000017d0| 20 66 6f 72 20 6c 6f 73 | 74 20 73 6c 65 65 70 20 | for los|t sleep |
|000017e0| 61 73 20 61 20 63 6f 6e | 73 65 71 75 65 6e 63 65 |as a con|sequence|
|000017f0| 20 6f 66 20 75 73 65 20 | 6f 66 20 74 68 69 73 20 | of use |of this |
|00001800| 73 6f 66 74 77 61 72 65 | 2e 0a 0a 20 53 65 6e 64 |software|... Send|
|00001810| 20 63 6f 6d 6d 65 6e 74 | 73 2c 20 62 75 67 20 72 | comment|s, bug r|
|00001820| 65 70 6f 72 74 73 2c 20 | 65 74 63 2e 20 74 6f 20 |eports, |etc. to |
|00001830| 62 77 61 72 6b 65 6e 74 | 40 70 6f 6c 79 73 6c 6f |bwarkent|@polyslo|
|00001840| 2e 43 61 6c 50 6f 6c 79 | 2e 45 44 55 2e 0a 20 20 |.CalPoly|.EDU.. |
|00001850| 20 28 53 6f 6f 6e 20 74 | 6f 20 62 65 20 61 74 20 | (Soon t|o be at |
|00001860| 40 53 75 6e 2e 43 4f 4d | 2c 20 73 6f 20 69 66 20 |@Sun.COM|, so if |
|00001870| 74 68 65 20 70 72 65 76 | 69 6f 75 73 20 61 64 64 |the prev|ious add|
|00001880| 72 65 73 73 20 64 6f 65 | 73 6e 27 74 20 77 6f 72 |ress doe|sn't wor|
|00001890| 6b 2c 0a 20 20 20 74 72 | 79 20 62 72 69 61 6e 40 |k,. tr|y brian@|
|000018a0| 63 73 75 66 72 65 73 2e | 43 53 55 46 72 65 73 6e |csufres.|CSUFresn|
|000018b0| 6f 2e 45 44 55 2e 29 0a | 0a 53 48 41 52 5f 45 4f |o.EDU.).|.SHAR_EO|
|000018c0| 46 0a 69 66 20 74 65 73 | 74 20 32 35 31 30 20 2d |F.if tes|t 2510 -|
|000018d0| 6e 65 20 22 60 77 63 20 | 2d 63 20 3c 20 27 52 45 |ne "`wc |-c < 'RE|
|000018e0| 41 44 4d 45 27 60 22 0a | 74 68 65 6e 0a 09 65 63 |ADME'`".|then..ec|
|000018f0| 68 6f 20 73 68 61 72 3a | 20 65 72 72 6f 72 20 74 |ho shar:| error t|
|00001900| 72 61 6e 73 6d 69 74 74 | 69 6e 67 20 22 27 52 45 |ransmitt|ing "'RE|
|00001910| 41 44 4d 45 27 22 20 27 | 28 73 68 6f 75 6c 64 20 |ADME'" '|(should |
|00001920| 68 61 76 65 20 62 65 65 | 6e 20 32 35 31 30 20 63 |have bee|n 2510 c|
|00001930| 68 61 72 61 63 74 65 72 | 73 29 27 0a 66 69 0a 66 |haracter|s)'.fi.f|
|00001940| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|00001950| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 65 63 68 |riting c|heck.ech|
|00001960| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|00001970| 6e 67 20 22 27 62 69 74 | 6d 61 70 73 2e 68 27 22 |ng "'bit|maps.h'"|
|00001980| 20 27 28 36 31 34 36 20 | 63 68 61 72 61 63 74 65 | '(6146 |characte|
|00001990| 72 73 29 27 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |rs)'.if |test -f |
|000019a0| 27 62 69 74 6d 61 70 73 | 2e 68 27 0a 74 68 65 6e |'bitmaps|.h'.then|
|000019b0| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 77 69 6c |..echo s|har: wil|
|000019c0| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|000019d0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 22 | existin|g file "|
|000019e0| 27 62 69 74 6d 61 70 73 | 2e 68 27 22 0a 65 6c 73 |'bitmaps|.h'".els|
|000019f0| 65 0a 63 61 74 20 3c 3c | 20 5c 53 48 41 52 5f 45 |e.cat <<| \SHAR_E|
|00001a00| 4f 46 20 3e 20 27 62 69 | 74 6d 61 70 73 2e 68 27 |OF > 'bi|tmaps.h'|
|00001a10| 0a 2f 2a 0a 20 2a 20 62 | 69 74 6d 61 70 73 2e 68 |./*. * b|itmaps.h|
|00001a20| 20 20 2d 2d 20 20 78 72 | 6f 62 6f 74 73 20 76 31 | -- xr|obots v1|
|00001a30| 2e 30 0a 20 2a 2f 0a 0a | 2f 2a 2d 2d 2d 2d 2d 2d |.0. */..|/*------|
|00001a40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a80| 2a 2f 0a 2f 2a 20 70 6c | 61 79 66 69 65 6c 64 20 |*/./* pl|ayfield |
|00001a90| 69 6d 61 67 65 73 20 2a | 2f 0a 0a 23 64 65 66 69 |images *|/..#defi|
|00001aa0| 6e 65 20 49 6d 61 67 65 | 5f 70 6c 61 79 65 72 5f |ne Image|_player_|
|00001ab0| 77 69 64 74 68 20 32 30 | 0a 23 64 65 66 69 6e 65 |width 20|.#define|
|00001ac0| 20 49 6d 61 67 65 5f 70 | 6c 61 79 65 72 5f 68 65 | Image_p|layer_he|
|00001ad0| 69 67 68 74 20 32 30 0a | 73 74 61 74 69 63 20 63 |ight 20.|static c|
|00001ae0| 68 61 72 20 49 6d 61 67 | 65 5f 70 6c 61 79 65 72 |har Imag|e_player|
|00001af0| 5f 62 69 74 73 5b 5d 20 | 3d 20 7b 0a 20 20 20 30 |_bits[] |= {. 0|
|00001b00| 78 63 30 2c 20 30 78 31 | 66 2c 20 30 78 30 30 2c |xc0, 0x1|f, 0x00,|
|00001b10| 20 30 78 33 30 2c 20 30 | 78 36 30 2c 20 30 78 30 | 0x30, 0|x60, 0x0|
|00001b20| 30 2c 20 30 78 30 38 2c | 20 30 78 38 30 2c 20 30 |0, 0x08,| 0x80, 0|
|00001b30| 78 30 30 2c 20 30 78 30 | 34 2c 20 30 78 30 30 2c |x00, 0x0|4, 0x00,|
|00001b40| 20 30 78 30 31 2c 0a 20 | 20 20 30 78 34 32 2c 20 | 0x01,. | 0x42, |
|00001b50| 30 78 31 30 2c 20 30 78 | 30 32 2c 20 30 78 65 32 |0x10, 0x|02, 0xe2|
|00001b60| 2c 20 30 78 33 38 2c 20 | 30 78 30 32 2c 20 30 78 |, 0x38, |0x02, 0x|
|00001b70| 34 31 2c 20 30 78 31 30 | 2c 20 30 78 30 34 2c 20 |41, 0x10|, 0x04, |
|00001b80| 30 78 30 31 2c 20 30 78 | 30 30 2c 20 30 78 30 34 |0x01, 0x|00, 0x04|
|00001b90| 2c 0a 20 20 20 30 78 30 | 31 2c 20 30 78 30 30 2c |,. 0x0|1, 0x00,|
|00001ba0| 20 30 78 30 34 2c 20 30 | 78 31 31 2c 20 30 78 34 | 0x04, 0|x11, 0x4|
|00001bb0| 30 2c 20 30 78 30 34 2c | 20 30 78 31 39 2c 20 30 |0, 0x04,| 0x19, 0|
|00001bc0| 78 63 30 2c 20 30 78 30 | 34 2c 20 30 78 31 64 2c |xc0, 0x0|4, 0x1d,|
|00001bd0| 20 30 78 63 30 2c 20 30 | 78 30 35 2c 0a 20 20 20 | 0xc0, 0|x05,. |
|00001be0| 30 78 33 31 2c 20 30 78 | 36 30 2c 20 30 78 30 34 |0x31, 0x|60, 0x04|
|00001bf0| 2c 20 30 78 65 32 2c 20 | 30 78 33 38 2c 20 30 78 |, 0xe2, |0x38, 0x|
|00001c00| 30 32 2c 20 30 78 63 32 | 2c 20 30 78 31 66 2c 20 |02, 0xc2|, 0x1f, |
|00001c10| 30 78 30 32 2c 20 30 78 | 38 34 2c 20 30 78 30 66 |0x02, 0x|84, 0x0f|
|00001c20| 2c 20 30 78 30 31 2c 0a | 20 20 20 30 78 30 38 2c |, 0x01,.| 0x08,|
|00001c30| 20 30 78 38 30 2c 20 30 | 78 30 30 2c 20 30 78 33 | 0x80, 0|x00, 0x3|
|00001c40| 30 2c 20 30 78 36 30 2c | 20 30 78 30 30 2c 20 30 |0, 0x60,| 0x00, 0|
|00001c50| 78 63 30 2c 20 30 78 31 | 66 2c 20 30 78 30 30 2c |xc0, 0x1|f, 0x00,|
|00001c60| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00001c70| 30 7d 3b 0a 0a 23 64 65 | 66 69 6e 65 20 49 6d 61 |0};..#de|fine Ima|
|00001c80| 67 65 5f 70 6c 61 79 65 | 72 5f 64 65 61 64 5f 77 |ge_playe|r_dead_w|
|00001c90| 69 64 74 68 20 32 30 0a | 23 64 65 66 69 6e 65 20 |idth 20.|#define |
|00001ca0| 49 6d 61 67 65 5f 70 6c | 61 79 65 72 5f 64 65 61 |Image_pl|ayer_dea|
|00001cb0| 64 5f 68 65 69 67 68 74 | 20 32 30 0a 73 74 61 74 |d_height| 20.stat|
|00001cc0| 69 63 20 63 68 61 72 20 | 49 6d 61 67 65 5f 70 6c |ic char |Image_pl|
|00001cd0| 61 79 65 72 5f 64 65 61 | 64 5f 62 69 74 73 5b 5d |ayer_dea|d_bits[]|
|00001ce0| 20 3d 20 7b 0a 20 20 20 | 30 78 63 30 2c 20 30 78 | = {. |0xc0, 0x|
|00001cf0| 31 66 2c 20 30 78 30 30 | 2c 20 30 78 33 30 2c 20 |1f, 0x00|, 0x30, |
|00001d00| 30 78 36 30 2c 20 30 78 | 30 30 2c 20 30 78 30 38 |0x60, 0x|00, 0x08|
|00001d10| 2c 20 30 78 38 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x80, |0x00, 0x|
|00001d20| 30 34 2c 20 30 78 30 30 | 2c 20 30 78 30 31 2c 0a |04, 0x00|, 0x01,.|
|00001d30| 20 20 20 30 78 31 32 2c | 20 30 78 34 35 2c 20 30 | 0x12,| 0x45, 0|
|00001d40| 78 30 32 2c 20 30 78 61 | 32 2c 20 30 78 32 38 2c |x02, 0xa|2, 0x28,|
|00001d50| 20 30 78 30 32 2c 20 30 | 78 34 31 2c 20 30 78 31 | 0x02, 0|x41, 0x1|
|00001d60| 30 2c 20 30 78 30 34 2c | 20 30 78 61 31 2c 20 30 |0, 0x04,| 0xa1, 0|
|00001d70| 78 32 38 2c 20 30 78 30 | 34 2c 0a 20 20 20 30 78 |x28, 0x0|4,. 0x|
|00001d80| 31 31 2c 20 30 78 34 35 | 2c 20 30 78 30 34 2c 20 |11, 0x45|, 0x04, |
|00001d90| 30 78 30 31 2c 20 30 78 | 30 30 2c 20 30 78 30 34 |0x01, 0x|00, 0x04|
|00001da0| 2c 20 30 78 30 31 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x01, |0x00, 0x|
|00001db0| 30 34 2c 20 30 78 30 31 | 2c 20 30 78 30 30 2c 20 |04, 0x01|, 0x00, |
|00001dc0| 30 78 30 34 2c 0a 20 20 | 20 30 78 30 31 2c 20 30 |0x04,. | 0x01, 0|
|00001dd0| 78 30 30 2c 20 30 78 30 | 34 2c 20 30 78 30 32 2c |x00, 0x0|4, 0x02,|
|00001de0| 20 30 78 30 30 2c 20 30 | 78 30 32 2c 20 30 78 66 | 0x00, 0|x02, 0xf|
|00001df0| 32 2c 20 30 78 37 66 2c | 20 30 78 30 32 2c 20 30 |2, 0x7f,| 0x02, 0|
|00001e00| 78 30 34 2c 20 30 78 30 | 30 2c 20 30 78 30 31 2c |x04, 0x0|0, 0x01,|
|00001e10| 0a 20 20 20 30 78 30 38 | 2c 20 30 78 38 30 2c 20 |. 0x08|, 0x80, |
|00001e20| 30 78 30 30 2c 20 30 78 | 33 30 2c 20 30 78 36 30 |0x00, 0x|30, 0x60|
|00001e30| 2c 20 30 78 30 30 2c 20 | 30 78 63 30 2c 20 30 78 |, 0x00, |0xc0, 0x|
|00001e40| 31 66 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |1f, 0x00|, 0x00, |
|00001e50| 30 78 30 30 2c 20 30 78 | 30 30 7d 3b 0a 0a 23 64 |0x00, 0x|00};..#d|
|00001e60| 65 66 69 6e 65 20 49 6d | 61 67 65 5f 72 6f 62 6f |efine Im|age_robo|
|00001e70| 74 5f 77 69 64 74 68 20 | 32 30 0a 23 64 65 66 69 |t_width |20.#defi|
|00001e80| 6e 65 20 49 6d 61 67 65 | 5f 72 6f 62 6f 74 5f 68 |ne Image|_robot_h|
|00001e90| 65 69 67 68 74 20 32 30 | 0a 73 74 61 74 69 63 20 |eight 20|.static |
|00001ea0| 63 68 61 72 20 49 6d 61 | 67 65 5f 72 6f 62 6f 74 |char Ima|ge_robot|
|00001eb0| 5f 62 69 74 73 5b 5d 20 | 3d 20 7b 0a 20 20 20 30 |_bits[] |= {. 0|
|00001ec0| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00001ed0| 20 30 78 65 30 2c 20 30 | 78 33 66 2c 20 30 78 30 | 0xe0, 0|x3f, 0x0|
|00001ee0| 30 2c 20 30 78 31 30 2c | 20 30 78 34 30 2c 20 30 |0, 0x10,| 0x40, 0|
|00001ef0| 78 30 30 2c 20 30 78 65 | 38 2c 20 30 78 66 66 2c |x00, 0xe|8, 0xff,|
|00001f00| 20 30 78 30 30 2c 0a 20 | 20 20 30 78 30 34 2c 20 | 0x00,. | 0x04, |
|00001f10| 30 78 33 38 2c 20 30 78 | 30 31 2c 20 30 78 66 61 |0x38, 0x|01, 0xfa|
|00001f20| 2c 20 30 78 66 66 2c 20 | 30 78 30 33 2c 20 30 78 |, 0xff, |0x03, 0x|
|00001f30| 34 32 2c 20 30 78 31 35 | 2c 20 30 78 30 32 2c 20 |42, 0x15|, 0x02, |
|00001f40| 30 78 61 61 2c 20 30 78 | 61 61 2c 20 30 78 30 32 |0xaa, 0x|aa, 0x02|
|00001f50| 2c 0a 20 20 20 30 78 34 | 61 2c 20 30 78 39 35 2c |,. 0x4|a, 0x95,|
|00001f60| 20 30 78 30 32 2c 20 30 | 78 38 61 2c 20 30 78 38 | 0x02, 0|x8a, 0x8|
|00001f70| 61 2c 20 30 78 30 32 2c | 20 30 78 31 61 2c 20 30 |a, 0x02,| 0x1a, 0|
|00001f80| 78 63 35 2c 20 30 78 30 | 32 2c 20 30 78 32 61 2c |xc5, 0x0|2, 0x2a,|
|00001f90| 20 30 78 61 32 2c 20 30 | 78 30 32 2c 0a 20 20 20 | 0xa2, 0|x02,. |
|00001fa0| 30 78 32 61 2c 20 30 78 | 61 30 2c 20 30 78 30 32 |0x2a, 0x|a0, 0x02|
|00001fb0| 2c 20 30 78 32 65 2c 20 | 30 78 61 32 2c 20 30 78 |, 0x2e, |0xa2, 0x|
|00001fc0| 30 33 2c 20 30 78 32 30 | 2c 20 30 78 32 32 2c 20 |03, 0x20|, 0x22, |
|00001fd0| 30 78 30 30 2c 20 30 78 | 32 30 2c 20 30 78 32 32 |0x00, 0x|20, 0x22|
|00001fe0| 2c 20 30 78 30 30 2c 0a | 20 20 20 30 78 32 30 2c |, 0x00,.| 0x20,|
|00001ff0| 20 30 78 32 32 2c 20 30 | 78 30 30 2c 20 30 78 32 | 0x22, 0|x00, 0x2|
|00002000| 30 2c 20 30 78 32 32 2c | 20 30 78 30 30 2c 20 30 |0, 0x22,| 0x00, 0|
|00002010| 78 65 30 2c 20 30 78 33 | 66 2c 20 30 78 30 30 2c |xe0, 0x3|f, 0x00,|
|00002020| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002030| 30 7d 3b 0a 0a 23 69 66 | 64 65 66 20 48 45 41 50 |0};..#if|def HEAP|
|00002040| 5f 53 54 59 4c 45 5f 31 | 0a 2f 2a 20 79 6f 75 72 |_STYLE_1|./* your|
|00002050| 20 63 68 6f 69 63 65 20 | 6f 66 20 68 6f 77 20 79 | choice |of how y|
|00002060| 6f 75 20 6c 69 6b 65 20 | 79 6f 75 72 20 64 65 61 |ou like |your dea|
|00002070| 64 20 72 6f 62 6f 74 73 | 20 74 6f 20 6c 6f 6f 6b |d robots| to look|
|00002080| 2e 2e 2e 2a 2f 0a 0a 23 | 64 65 66 69 6e 65 20 49 |...*/..#|define I|
|00002090| 6d 61 67 65 5f 68 65 61 | 70 5f 77 69 64 74 68 20 |mage_hea|p_width |
|000020a0| 32 30 0a 23 64 65 66 69 | 6e 65 20 49 6d 61 67 65 |20.#defi|ne Image|
|000020b0| 5f 68 65 61 70 5f 68 65 | 69 67 68 74 20 32 30 0a |_heap_he|ight 20.|
|000020c0| 73 74 61 74 69 63 20 63 | 68 61 72 20 49 6d 61 67 |static c|har Imag|
|000020d0| 65 5f 68 65 61 70 5f 62 | 69 74 73 5b 5d 20 3d 20 |e_heap_b|its[] = |
|000020e0| 7b 0a 20 20 20 30 78 30 | 30 2c 20 30 78 30 30 2c |{. 0x0|0, 0x00,|
|000020f0| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002100| 30 2c 20 30 78 30 30 2c | 20 30 78 30 30 2c 20 30 |0, 0x00,| 0x00, 0|
|00002110| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00002120| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 0a 20 20 20 | 0x00, 0|x00,. |
|00002130| 30 78 65 30 2c 20 30 78 | 66 66 2c 20 30 78 30 31 |0xe0, 0x|ff, 0x01|
|00002140| 2c 20 30 78 32 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x20, |0x00, 0x|
|00002150| 30 33 2c 20 30 78 61 30 | 2c 20 30 78 61 61 2c 20 |03, 0xa0|, 0xaa, |
|00002160| 30 78 30 36 2c 20 30 78 | 66 66 2c 20 30 78 35 37 |0x06, 0x|ff, 0x57|
|00002170| 2c 20 30 78 30 64 2c 0a | 20 20 20 30 78 30 31 2c |, 0x0d,.| 0x01,|
|00002180| 20 30 78 65 38 2c 20 30 | 78 30 61 2c 20 30 78 35 | 0xe8, 0|x0a, 0x5|
|00002190| 35 2c 20 30 78 66 35 2c | 20 30 78 30 61 2c 20 30 |5, 0xf5,| 0x0a, 0|
|000021a0| 78 61 39 2c 20 30 78 66 | 61 2c 20 30 78 30 65 2c |xa9, 0xf|a, 0x0e,|
|000021b0| 20 30 78 35 35 2c 20 30 | 78 66 64 2c 20 30 78 30 | 0x55, 0|xfd, 0x0|
|000021c0| 61 2c 0a 20 20 20 30 78 | 62 66 2c 20 30 78 66 65 |a,. 0x|bf, 0xfe|
|000021d0| 2c 20 30 78 30 65 2c 20 | 30 78 35 35 2c 20 30 78 |, 0x0e, |0x55, 0x|
|000021e0| 66 64 2c 20 30 78 30 61 | 2c 20 30 78 61 62 2c 20 |fd, 0x0a|, 0xab, |
|000021f0| 30 78 37 61 2c 20 30 78 | 30 65 2c 20 30 78 35 35 |0x7a, 0x|0e, 0x55|
|00002200| 2c 20 30 78 37 35 2c 20 | 30 78 30 61 2c 0a 20 20 |, 0x75, |0x0a,. |
|00002210| 20 30 78 66 66 2c 20 30 | 78 65 61 2c 20 30 78 30 | 0xff, 0|xea, 0x0|
|00002220| 36 2c 20 30 78 65 30 2c | 20 30 78 35 66 2c 20 30 |6, 0xe0,| 0x5f, 0|
|00002230| 78 30 33 2c 20 30 78 61 | 30 2c 20 30 78 61 61 2c |x03, 0xa|0, 0xaa,|
|00002240| 20 30 78 30 31 2c 20 30 | 78 65 30 2c 20 30 78 66 | 0x01, 0|xe0, 0xf|
|00002250| 66 2c 20 30 78 30 30 7d | 3b 0a 0a 23 65 6c 73 65 |f, 0x00}|;..#else|
|00002260| 0a 0a 23 64 65 66 69 6e | 65 20 49 6d 61 67 65 5f |..#defin|e Image_|
|00002270| 68 65 61 70 5f 77 69 64 | 74 68 20 32 30 0a 23 64 |heap_wid|th 20.#d|
|00002280| 65 66 69 6e 65 20 49 6d | 61 67 65 5f 68 65 61 70 |efine Im|age_heap|
|00002290| 5f 68 65 69 67 68 74 20 | 32 30 0a 73 74 61 74 69 |_height |20.stati|
|000022a0| 63 20 63 68 61 72 20 49 | 6d 61 67 65 5f 68 65 61 |c char I|mage_hea|
|000022b0| 70 5f 62 69 74 73 5b 5d | 20 3d 20 7b 0a 20 20 20 |p_bits[]| = {. |
|000022c0| 30 78 30 30 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x00, 0x|00, 0x00|
|000022d0| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|000022e0| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |00, 0x00|, 0x00, |
|000022f0| 30 78 30 30 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x00, 0x|00, 0x00|
|00002300| 2c 20 30 78 30 30 2c 0a | 20 20 20 30 78 30 30 2c |, 0x00,.| 0x00,|
|00002310| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002320| 30 2c 20 30 78 30 30 2c | 20 30 78 30 30 2c 20 30 |0, 0x00,| 0x00, 0|
|00002330| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00002340| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002350| 30 2c 0a 20 20 20 30 78 | 30 30 2c 20 30 78 30 30 |0,. 0x|00, 0x00|
|00002360| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|00002370| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |00, 0x00|, 0x00, |
|00002380| 30 78 30 63 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x0c, 0x|00, 0x00|
|00002390| 2c 20 30 78 31 65 2c 20 | 30 78 30 30 2c 0a 20 20 |, 0x1e, |0x00,. |
|000023a0| 20 30 78 30 30 2c 20 30 | 78 33 35 2c 20 30 78 30 | 0x00, 0|x35, 0x0|
|000023b0| 30 2c 20 30 78 38 30 2c | 20 30 78 35 62 2c 20 30 |0, 0x80,| 0x5b, 0|
|000023c0| 78 30 30 2c 20 30 78 63 | 30 2c 20 30 78 61 65 2c |x00, 0xc|0, 0xae,|
|000023d0| 20 30 78 30 30 2c 20 30 | 78 65 30 2c 20 30 78 66 | 0x00, 0|xe0, 0xf|
|000023e0| 35 2c 20 30 78 30 30 2c | 0a 20 20 20 30 78 62 30 |5, 0x00,|. 0xb0|
|000023f0| 2c 20 30 78 61 61 2c 20 | 30 78 30 31 2c 20 30 78 |, 0xaa, |0x01, 0x|
|00002400| 65 38 2c 20 30 78 36 66 | 2c 20 30 78 30 33 2c 20 |e8, 0x6f|, 0x03, |
|00002410| 30 78 37 63 2c 20 30 78 | 66 65 2c 20 30 78 30 33 |0x7c, 0x|fe, 0x03|
|00002420| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|00002430| 30 30 7d 3b 0a 0a 23 65 | 6e 64 69 66 0a 0a 0a 23 |00};..#e|ndif...#|
|00002440| 64 65 66 69 6e 65 20 64 | 6f 74 5f 77 69 64 74 68 |define d|ot_width|
|00002450| 20 31 36 0a 23 64 65 66 | 69 6e 65 20 64 6f 74 5f | 16.#def|ine dot_|
|00002460| 68 65 69 67 68 74 20 31 | 36 0a 73 74 61 74 69 63 |height 1|6.static|
|00002470| 20 63 68 61 72 20 64 6f | 74 5f 62 69 74 73 5b 5d | char do|t_bits[]|
|00002480| 20 3d 20 7b 0a 20 20 20 | 30 78 30 30 2c 20 30 78 | = {. |0x00, 0x|
|00002490| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |00, 0x00|, 0x00, |
|000024a0| 30 78 30 30 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x00, 0x|00, 0x00|
|000024b0| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|000024c0| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 0a |00, 0x00|, 0x00,.|
|000024d0| 20 20 20 30 78 30 30 2c | 20 30 78 30 36 2c 20 30 | 0x00,| 0x06, 0|
|000024e0| 78 30 30 2c 20 30 78 30 | 39 2c 20 30 78 38 30 2c |x00, 0x0|9, 0x80,|
|000024f0| 20 30 78 31 30 2c 20 30 | 78 34 30 2c 20 30 78 32 | 0x10, 0|x40, 0x2|
|00002500| 30 2c 20 30 78 34 30 2c | 20 30 78 32 30 2c 20 30 |0, 0x40,| 0x20, 0|
|00002510| 78 38 30 2c 20 30 78 31 | 30 2c 0a 20 20 20 30 78 |x80, 0x1|0,. 0x|
|00002520| 30 30 2c 20 30 78 30 39 | 2c 20 30 78 30 30 2c 20 |00, 0x09|, 0x00, |
|00002530| 30 78 30 36 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x06, 0x|00, 0x00|
|00002540| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 7d 3b 0a 0a |, 0x00, |0x00};..|
|00002550| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00002560| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002590| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0a 2f 2a 20 63 75 |--------|*/./* cu|
|000025a0| 72 73 6f 72 73 20 2a 2f | 0a 0a 23 64 65 66 69 6e |rsors */|..#defin|
|000025b0| 65 20 64 6f 77 6e 5f 77 | 69 64 74 68 20 31 36 0a |e down_w|idth 16.|
|000025c0| 23 64 65 66 69 6e 65 20 | 64 6f 77 6e 5f 68 65 69 |#define |down_hei|
|000025d0| 67 68 74 20 31 36 0a 73 | 74 61 74 69 63 20 63 68 |ght 16.s|tatic ch|
|000025e0| 61 72 20 64 6f 77 6e 5f | 62 69 74 73 5b 5d 20 3d |ar down_|bits[] =|
|000025f0| 20 7b 0a 20 20 20 30 78 | 30 30 2c 20 30 78 30 30 | {. 0x|00, 0x00|
|00002600| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|00002610| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |00, 0x00|, 0x00, |
|00002620| 30 78 30 30 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x00, 0x|00, 0x00|
|00002630| 2c 20 30 78 38 30 2c 20 | 30 78 30 31 2c 0a 20 20 |, 0x80, |0x01,. |
|00002640| 20 30 78 38 30 2c 20 30 | 78 30 31 2c 20 30 78 38 | 0x80, 0|x01, 0x8|
|00002650| 30 2c 20 30 78 30 31 2c | 20 30 78 38 30 2c 20 30 |0, 0x01,| 0x80, 0|
|00002660| 78 30 31 2c 20 30 78 38 | 30 2c 20 30 78 30 31 2c |x01, 0x8|0, 0x01,|
|00002670| 20 30 78 38 30 2c 20 30 | 78 30 31 2c 20 30 78 62 | 0x80, 0|x01, 0xb|
|00002680| 30 2c 20 30 78 30 64 2c | 0a 20 20 20 30 78 65 30 |0, 0x0d,|. 0xe0|
|00002690| 2c 20 30 78 30 37 2c 20 | 30 78 63 30 2c 20 30 78 |, 0x07, |0xc0, 0x|
|000026a0| 30 33 2c 20 30 78 38 30 | 2c 20 30 78 30 31 2c 20 |03, 0x80|, 0x01, |
|000026b0| 30 78 30 30 2c 20 30 78 | 30 30 7d 3b 0a 0a 23 64 |0x00, 0x|00};..#d|
|000026c0| 65 66 69 6e 65 20 64 6f | 77 6e 5f 6c 65 66 74 5f |efine do|wn_left_|
|000026d0| 77 69 64 74 68 20 31 36 | 0a 23 64 65 66 69 6e 65 |width 16|.#define|
|000026e0| 20 64 6f 77 6e 5f 6c 65 | 66 74 5f 68 65 69 67 68 | down_le|ft_heigh|
|000026f0| 74 20 31 36 0a 73 74 61 | 74 69 63 20 63 68 61 72 |t 16.sta|tic char|
|00002700| 20 64 6f 77 6e 5f 6c 65 | 66 74 5f 62 69 74 73 5b | down_le|ft_bits[|
|00002710| 5d 20 3d 20 7b 0a 20 20 | 20 30 78 30 30 2c 20 30 |] = {. | 0x00, 0|
|00002720| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00002730| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002740| 30 2c 20 30 78 30 30 2c | 20 30 78 30 30 2c 20 30 |0, 0x00,| 0x00, 0|
|00002750| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00002760| 0a 20 20 20 30 78 30 30 | 2c 20 30 78 30 31 2c 20 |. 0x00|, 0x01, |
|00002770| 30 78 38 30 2c 20 30 78 | 30 33 2c 20 30 78 63 30 |0x80, 0x|03, 0xc0|
|00002780| 2c 20 30 78 30 31 2c 20 | 30 78 65 36 2c 20 30 78 |, 0x01, |0xe6, 0x|
|00002790| 30 30 2c 20 30 78 37 36 | 2c 20 30 78 30 30 2c 20 |00, 0x76|, 0x00, |
|000027a0| 30 78 33 65 2c 20 30 78 | 30 30 2c 0a 20 20 20 30 |0x3e, 0x|00,. 0|
|000027b0| 78 31 65 2c 20 30 78 30 | 30 2c 20 30 78 37 65 2c |x1e, 0x0|0, 0x7e,|
|000027c0| 20 30 78 30 30 2c 20 30 | 78 37 65 2c 20 30 78 30 | 0x00, 0|x7e, 0x0|
|000027d0| 30 2c 20 30 78 30 30 2c | 20 30 78 30 30 7d 3b 0a |0, 0x00,| 0x00};.|
|000027e0| 0a 23 64 65 66 69 6e 65 | 20 64 6f 77 6e 5f 72 69 |.#define| down_ri|
|000027f0| 67 68 74 5f 77 69 64 74 | 68 20 31 36 0a 23 64 65 |ght_widt|h 16.#de|
|00002800| 66 69 6e 65 20 64 6f 77 | 6e 5f 72 69 67 68 74 5f |fine dow|n_right_|
|00002810| 68 65 69 67 68 74 20 31 | 36 0a 73 74 61 74 69 63 |height 1|6.static|
|00002820| 20 63 68 61 72 20 64 6f | 77 6e 5f 72 69 67 68 74 | char do|wn_right|
|00002830| 5f 62 69 74 73 5b 5d 20 | 3d 20 7b 0a 20 20 20 30 |_bits[] |= {. 0|
|00002840| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00002850| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002860| 30 2c 20 30 78 30 30 2c | 20 30 78 30 30 2c 20 30 |0, 0x00,| 0x00, 0|
|00002870| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00002880| 20 30 78 30 30 2c 0a 20 | 20 20 30 78 38 30 2c 20 | 0x00,. | 0x80, |
|00002890| 30 78 30 30 2c 20 30 78 | 63 30 2c 20 30 78 30 31 |0x00, 0x|c0, 0x01|
|000028a0| 2c 20 30 78 38 30 2c 20 | 30 78 30 33 2c 20 30 78 |, 0x80, |0x03, 0x|
|000028b0| 30 30 2c 20 30 78 36 37 | 2c 20 30 78 30 30 2c 20 |00, 0x67|, 0x00, |
|000028c0| 30 78 36 65 2c 20 30 78 | 30 30 2c 20 30 78 37 63 |0x6e, 0x|00, 0x7c|
|000028d0| 2c 0a 20 20 20 30 78 30 | 30 2c 20 30 78 37 38 2c |,. 0x0|0, 0x78,|
|000028e0| 20 30 78 30 30 2c 20 30 | 78 37 65 2c 20 30 78 30 | 0x00, 0|x7e, 0x0|
|000028f0| 30 2c 20 30 78 37 65 2c | 20 30 78 30 30 2c 20 30 |0, 0x7e,| 0x00, 0|
|00002900| 78 30 30 7d 3b 0a 0a 23 | 64 65 66 69 6e 65 20 6c |x00};..#|define l|
|00002910| 65 66 74 5f 77 69 64 74 | 68 20 31 36 0a 23 64 65 |eft_widt|h 16.#de|
|00002920| 66 69 6e 65 20 6c 65 66 | 74 5f 68 65 69 67 68 74 |fine lef|t_height|
|00002930| 20 31 36 0a 73 74 61 74 | 69 63 20 63 68 61 72 20 | 16.stat|ic char |
|00002940| 6c 65 66 74 5f 62 69 74 | 73 5b 5d 20 3d 20 7b 0a |left_bit|s[] = {.|
|00002950| 20 20 20 30 78 30 30 2c | 20 30 78 30 30 2c 20 30 | 0x00,| 0x00, 0|
|00002960| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00002970| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002980| 30 2c 20 30 78 31 30 2c | 20 30 78 30 30 2c 20 30 |0, 0x10,| 0x00, 0|
|00002990| 78 31 38 2c 20 30 78 30 | 30 2c 0a 20 20 20 30 78 |x18, 0x0|0,. 0x|
|000029a0| 30 63 2c 20 30 78 30 30 | 2c 20 30 78 66 65 2c 20 |0c, 0x00|, 0xfe, |
|000029b0| 30 78 30 37 2c 20 30 78 | 66 65 2c 20 30 78 30 37 |0x07, 0x|fe, 0x07|
|000029c0| 2c 20 30 78 30 63 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x0c, |0x00, 0x|
|000029d0| 31 38 2c 20 30 78 30 30 | 2c 20 30 78 31 30 2c 20 |18, 0x00|, 0x10, |
|000029e0| 30 78 30 30 2c 0a 20 20 | 20 30 78 30 30 2c 20 30 |0x00,. | 0x00, 0|
|000029f0| 78 30 30 2c 20 30 78 30 | 30 2c 20 30 78 30 30 2c |x00, 0x0|0, 0x00,|
|00002a00| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002a10| 30 2c 20 30 78 30 30 7d | 3b 0a 0a 23 64 65 66 69 |0, 0x00}|;..#defi|
|00002a20| 6e 65 20 72 69 67 68 74 | 5f 77 69 64 74 68 20 31 |ne right|_width 1|
|00002a30| 36 0a 23 64 65 66 69 6e | 65 20 72 69 67 68 74 5f |6.#defin|e right_|
|00002a40| 68 65 69 67 68 74 20 31 | 36 0a 73 74 61 74 69 63 |height 1|6.static|
|00002a50| 20 63 68 61 72 20 72 69 | 67 68 74 5f 62 69 74 73 | char ri|ght_bits|
|00002a60| 5b 5d 20 3d 20 7b 0a 20 | 20 20 30 78 30 30 2c 20 |[] = {. | 0x00, |
|00002a70| 30 78 30 30 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x00, 0x|00, 0x00|
|00002a80| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|00002a90| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |00, 0x00|, 0x00, |
|00002aa0| 30 78 30 38 2c 20 30 78 | 30 30 2c 20 30 78 31 38 |0x08, 0x|00, 0x18|
|00002ab0| 2c 0a 20 20 20 30 78 30 | 30 2c 20 30 78 33 30 2c |,. 0x0|0, 0x30,|
|00002ac0| 20 30 78 65 30 2c 20 30 | 78 37 66 2c 20 30 78 65 | 0xe0, 0|x7f, 0xe|
|00002ad0| 30 2c 20 30 78 37 66 2c | 20 30 78 30 30 2c 20 30 |0, 0x7f,| 0x00, 0|
|00002ae0| 78 33 30 2c 20 30 78 30 | 30 2c 20 30 78 31 38 2c |x30, 0x0|0, 0x18,|
|00002af0| 20 30 78 30 30 2c 20 30 | 78 30 38 2c 0a 20 20 20 | 0x00, 0|x08,. |
|00002b00| 30 78 30 30 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x00, 0x|00, 0x00|
|00002b10| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|00002b20| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 7d 3b |00, 0x00|, 0x00};|
|00002b30| 0a 0a 23 64 65 66 69 6e | 65 20 75 70 5f 77 69 64 |..#defin|e up_wid|
|00002b40| 74 68 20 31 36 0a 23 64 | 65 66 69 6e 65 20 75 70 |th 16.#d|efine up|
|00002b50| 5f 68 65 69 67 68 74 20 | 31 36 0a 73 74 61 74 69 |_height |16.stati|
|00002b60| 63 20 63 68 61 72 20 75 | 70 5f 62 69 74 73 5b 5d |c char u|p_bits[]|
|00002b70| 20 3d 20 7b 0a 20 20 20 | 30 78 30 30 2c 20 30 78 | = {. |0x00, 0x|
|00002b80| 30 30 2c 20 30 78 38 30 | 2c 20 30 78 30 31 2c 20 |00, 0x80|, 0x01, |
|00002b90| 30 78 63 30 2c 20 30 78 | 30 33 2c 20 30 78 65 30 |0xc0, 0x|03, 0xe0|
|00002ba0| 2c 20 30 78 30 37 2c 20 | 30 78 62 30 2c 20 30 78 |, 0x07, |0xb0, 0x|
|00002bb0| 30 64 2c 20 30 78 38 30 | 2c 20 30 78 30 31 2c 0a |0d, 0x80|, 0x01,.|
|00002bc0| 20 20 20 30 78 38 30 2c | 20 30 78 30 31 2c 20 30 | 0x80,| 0x01, 0|
|00002bd0| 78 38 30 2c 20 30 78 30 | 31 2c 20 30 78 38 30 2c |x80, 0x0|1, 0x80,|
|00002be0| 20 30 78 30 31 2c 20 30 | 78 38 30 2c 20 30 78 30 | 0x01, 0|x80, 0x0|
|00002bf0| 31 2c 20 30 78 38 30 2c | 20 30 78 30 31 2c 20 30 |1, 0x80,| 0x01, 0|
|00002c00| 78 30 30 2c 20 30 78 30 | 30 2c 0a 20 20 20 30 78 |x00, 0x0|0,. 0x|
|00002c10| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |00, 0x00|, 0x00, |
|00002c20| 30 78 30 30 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x00, 0x|00, 0x00|
|00002c30| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 7d 3b 0a 0a |, 0x00, |0x00};..|
|00002c40| 23 64 65 66 69 6e 65 20 | 75 70 5f 72 69 67 68 74 |#define |up_right|
|00002c50| 5f 77 69 64 74 68 20 31 | 36 0a 23 64 65 66 69 6e |_width 1|6.#defin|
|00002c60| 65 20 75 70 5f 72 69 67 | 68 74 5f 68 65 69 67 68 |e up_rig|ht_heigh|
|00002c70| 74 20 31 36 0a 73 74 61 | 74 69 63 20 63 68 61 72 |t 16.sta|tic char|
|00002c80| 20 75 70 5f 72 69 67 68 | 74 5f 62 69 74 73 5b 5d | up_righ|t_bits[]|
|00002c90| 20 3d 20 7b 0a 20 20 20 | 30 78 30 30 2c 20 30 78 | = {. |0x00, 0x|
|00002ca0| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 37 65 2c 20 |00, 0x00|, 0x7e, |
|00002cb0| 30 78 30 30 2c 20 30 78 | 37 65 2c 20 30 78 30 30 |0x00, 0x|7e, 0x00|
|00002cc0| 2c 20 30 78 37 38 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x78, |0x00, 0x|
|00002cd0| 37 63 2c 20 30 78 30 30 | 2c 20 30 78 36 65 2c 0a |7c, 0x00|, 0x6e,.|
|00002ce0| 20 20 20 30 78 30 30 2c | 20 30 78 36 37 2c 20 30 | 0x00,| 0x67, 0|
|00002cf0| 78 38 30 2c 20 30 78 30 | 33 2c 20 30 78 63 30 2c |x80, 0x0|3, 0xc0,|
|00002d00| 20 30 78 30 31 2c 20 30 | 78 38 30 2c 20 30 78 30 | 0x01, 0|x80, 0x0|
|00002d10| 30 2c 20 30 78 30 30 2c | 20 30 78 30 30 2c 20 30 |0, 0x00,| 0x00, 0|
|00002d20| 78 30 30 2c 20 30 78 30 | 30 2c 0a 20 20 20 30 78 |x00, 0x0|0,. 0x|
|00002d30| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |00, 0x00|, 0x00, |
|00002d40| 30 78 30 30 2c 20 30 78 | 30 30 2c 20 30 78 30 30 |0x00, 0x|00, 0x00|
|00002d50| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 7d 3b 0a 0a |, 0x00, |0x00};..|
|00002d60| 0a 23 64 65 66 69 6e 65 | 20 75 70 5f 6c 65 66 74 |.#define| up_left|
|00002d70| 5f 77 69 64 74 68 20 31 | 36 0a 23 64 65 66 69 6e |_width 1|6.#defin|
|00002d80| 65 20 75 70 5f 6c 65 66 | 74 5f 68 65 69 67 68 74 |e up_lef|t_height|
|00002d90| 20 31 36 0a 73 74 61 74 | 69 63 20 63 68 61 72 20 | 16.stat|ic char |
|00002da0| 75 70 5f 6c 65 66 74 5f | 62 69 74 73 5b 5d 20 3d |up_left_|bits[] =|
|00002db0| 20 7b 0a 20 20 20 30 78 | 30 30 2c 20 30 78 30 30 | {. 0x|00, 0x00|
|00002dc0| 2c 20 30 78 37 65 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x7e, |0x00, 0x|
|00002dd0| 37 65 2c 20 30 78 30 30 | 2c 20 30 78 31 65 2c 20 |7e, 0x00|, 0x1e, |
|00002de0| 30 78 30 30 2c 20 30 78 | 33 65 2c 20 30 78 30 30 |0x00, 0x|3e, 0x00|
|00002df0| 2c 20 30 78 37 36 2c 20 | 30 78 30 30 2c 0a 20 20 |, 0x76, |0x00,. |
|00002e00| 20 30 78 65 36 2c 20 30 | 78 30 30 2c 20 30 78 63 | 0xe6, 0|x00, 0xc|
|00002e10| 30 2c 20 30 78 30 31 2c | 20 30 78 38 30 2c 20 30 |0, 0x01,| 0x80, 0|
|00002e20| 78 30 33 2c 20 30 78 30 | 30 2c 20 30 78 30 31 2c |x03, 0x0|0, 0x01,|
|00002e30| 20 30 78 30 30 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x00, 0|x00, 0x0|
|00002e40| 30 2c 20 30 78 30 30 2c | 0a 20 20 20 30 78 30 30 |0, 0x00,|. 0x00|
|00002e50| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|00002e60| 30 30 2c 20 30 78 30 30 | 2c 20 30 78 30 30 2c 20 |00, 0x00|, 0x00, |
|00002e70| 30 78 30 30 2c 20 30 78 | 30 30 7d 3b 0a 0a 0a 23 |0x00, 0x|00};...#|
|00002e80| 64 65 66 69 6e 65 20 73 | 74 61 79 5f 77 69 64 74 |define s|tay_widt|
|00002e90| 68 20 31 36 0a 23 64 65 | 66 69 6e 65 20 73 74 61 |h 16.#de|fine sta|
|00002ea0| 79 5f 68 65 69 67 68 74 | 20 31 36 0a 73 74 61 74 |y_height| 16.stat|
|00002eb0| 69 63 20 63 68 61 72 20 | 73 74 61 79 5f 62 69 74 |ic char |stay_bit|
|00002ec0| 73 5b 5d 20 3d 20 7b 0a | 20 20 20 30 78 38 30 2c |s[] = {.| 0x80,|
|00002ed0| 20 30 78 30 30 2c 20 30 | 78 38 30 2c 20 30 78 30 | 0x00, 0|x80, 0x0|
|00002ee0| 30 2c 20 30 78 38 30 2c | 20 30 78 30 30 2c 20 30 |0, 0x80,| 0x00, 0|
|00002ef0| 78 65 30 2c 20 30 78 30 | 33 2c 20 30 78 63 30 2c |xe0, 0x0|3, 0xc0,|
|00002f00| 20 30 78 30 31 2c 20 30 | 78 38 30 2c 20 30 78 31 | 0x01, 0|x80, 0x1|
|00002f10| 30 2c 0a 20 20 20 30 78 | 30 38 2c 20 30 78 31 38 |0,. 0x|08, 0x18|
|00002f20| 2c 20 30 78 31 38 2c 20 | 30 78 66 63 2c 20 30 78 |, 0x18, |0xfc, 0x|
|00002f30| 33 66 2c 20 30 78 31 38 | 2c 20 30 78 31 38 2c 20 |3f, 0x18|, 0x18, |
|00002f40| 30 78 31 30 2c 20 30 78 | 30 38 2c 20 30 78 30 31 |0x10, 0x|08, 0x01|
|00002f50| 2c 20 30 78 38 30 2c 20 | 30 78 30 33 2c 0a 20 20 |, 0x80, |0x03,. |
|00002f60| 20 30 78 63 30 2c 20 30 | 78 30 37 2c 20 30 78 30 | 0xc0, 0|x07, 0x0|
|00002f70| 30 2c 20 30 78 30 31 2c | 20 30 78 30 30 2c 20 30 |0, 0x01,| 0x00, 0|
|00002f80| 78 30 31 2c 20 30 78 30 | 30 2c 20 30 78 30 31 7d |x01, 0x0|0, 0x01}|
|00002f90| 3b 0a 0a 0a 23 64 65 66 | 69 6e 65 20 63 61 6e 74 |;...#def|ine cant|
|00002fa0| 5f 67 6f 5f 77 69 64 74 | 68 20 31 36 0a 23 64 65 |_go_widt|h 16.#de|
|00002fb0| 66 69 6e 65 20 63 61 6e | 74 5f 67 6f 5f 68 65 69 |fine can|t_go_hei|
|00002fc0| 67 68 74 20 31 36 0a 73 | 74 61 74 69 63 20 63 68 |ght 16.s|tatic ch|
|00002fd0| 61 72 20 63 61 6e 74 5f | 67 6f 5f 62 69 74 73 5b |ar cant_|go_bits[|
|00002fe0| 5d 20 3d 20 7b 0a 20 20 | 20 30 78 30 30 2c 20 30 |] = {. | 0x00, 0|
|00002ff0| 78 30 30 2c 20 30 78 63 | 30 2c 20 30 78 30 37 2c |x00, 0xc|0, 0x07,|
|00003000| 20 30 78 32 30 2c 20 30 | 78 30 38 2c 20 30 78 39 | 0x20, 0|x08, 0x9|
|00003010| 30 2c 20 30 78 31 33 2c | 20 30 78 35 30 2c 20 30 |0, 0x13,| 0x50, 0|
|00003020| 78 31 32 2c 20 30 78 32 | 30 2c 20 30 78 31 32 2c |x12, 0x2|0, 0x12,|
|00003030| 0a 20 20 20 30 78 30 30 | 2c 20 30 78 30 39 2c 20 |. 0x00|, 0x09, |
|00003040| 30 78 38 30 2c 20 30 78 | 30 34 2c 20 30 78 38 30 |0x80, 0x|04, 0x80|
|00003050| 2c 20 30 78 30 32 2c 20 | 30 78 38 30 2c 20 30 78 |, 0x02, |0x80, 0x|
|00003060| 30 32 2c 20 30 78 30 30 | 2c 20 30 78 30 31 2c 20 |02, 0x00|, 0x01, |
|00003070| 30 78 30 30 2c 20 30 78 | 30 31 2c 0a 20 20 20 30 |0x00, 0x|01,. 0|
|00003080| 78 38 30 2c 20 30 78 30 | 32 2c 20 30 78 38 30 2c |x80, 0x0|2, 0x80,|
|00003090| 20 30 78 30 32 2c 20 30 | 78 30 30 2c 20 30 78 30 | 0x02, 0|x00, 0x0|
|000030a0| 31 2c 20 30 78 30 30 2c | 20 30 78 30 30 7d 3b 0a |1, 0x00,| 0x00};.|
|000030b0| 0a 0a 23 64 65 66 69 6e | 65 20 74 68 75 6d 62 73 |..#defin|e thumbs|
|000030c0| 5f 64 6f 77 6e 5f 77 69 | 64 74 68 20 31 36 0a 23 |_down_wi|dth 16.#|
|000030d0| 64 65 66 69 6e 65 20 74 | 68 75 6d 62 73 5f 64 6f |define t|humbs_do|
|000030e0| 77 6e 5f 68 65 69 67 68 | 74 20 31 36 0a 23 64 65 |wn_heigh|t 16.#de|
|000030f0| 66 69 6e 65 20 74 68 75 | 6d 62 73 5f 64 6f 77 6e |fine thu|mbs_down|
|00003100| 5f 78 5f 68 6f 74 20 37 | 0a 23 64 65 66 69 6e 65 |_x_hot 7|.#define|
|00003110| 20 74 68 75 6d 62 73 5f | 64 6f 77 6e 5f 79 5f 68 | thumbs_|down_y_h|
|00003120| 6f 74 20 31 35 0a 73 74 | 61 74 69 63 20 63 68 61 |ot 15.st|atic cha|
|00003130| 72 20 74 68 75 6d 62 73 | 5f 64 6f 77 6e 5f 62 69 |r thumbs|_down_bi|
|00003140| 74 73 5b 5d 20 3d 20 7b | 0a 20 20 20 30 78 30 30 |ts[] = {|. 0x00|
|00003150| 2c 20 30 78 30 30 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x00, |0x00, 0x|
|00003160| 30 30 2c 20 30 78 65 30 | 2c 20 30 78 33 66 2c 20 |00, 0xe0|, 0x3f, |
|00003170| 30 78 31 65 2c 20 30 78 | 34 30 2c 20 30 78 30 30 |0x1e, 0x|40, 0x00|
|00003180| 2c 20 30 78 37 38 2c 20 | 30 78 30 30 2c 20 30 78 |, 0x78, |0x00, 0x|
|00003190| 38 30 2c 0a 20 20 20 30 | 78 30 30 2c 20 30 78 37 |80,. 0|x00, 0x7|
|000031a0| 38 2c 20 30 78 30 30 2c | 20 30 78 38 30 2c 20 30 |8, 0x00,| 0x80, 0|
|000031b0| 78 30 30 2c 20 30 78 37 | 63 2c 20 30 78 30 65 2c |x00, 0x7|c, 0x0e,|
|000031c0| 20 30 78 34 30 2c 20 30 | 78 33 30 2c 20 30 78 33 | 0x40, 0|x30, 0x3|
|000031d0| 65 2c 20 30 78 34 30 2c | 20 30 78 30 33 2c 0a 20 |e, 0x40,| 0x03,. |
|000031e0| 20 20 30 78 34 30 2c 20 | 30 78 30 31 2c 20 30 78 | 0x40, |0x01, 0x|
|000031f0| 34 30 2c 20 30 78 30 31 | 2c 20 30 78 34 30 2c 20 |40, 0x01|, 0x40, |
|00003200| 30 78 30 31 2c 20 30 78 | 63 30 2c 20 30 78 30 30 |0x01, 0x|c0, 0x00|
|00003210| 7d 3b 0a 53 48 41 52 5f | 45 4f 46 0a 69 66 20 74 |};.SHAR_|EOF.if t|
|00003220| 65 73 74 20 36 31 34 36 | 20 2d 6e 65 20 22 60 77 |est 6146| -ne "`w|
|00003230| 63 20 2d 63 20 3c 20 27 | 62 69 74 6d 61 70 73 2e |c -c < '|bitmaps.|
|00003240| 68 27 60 22 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |h'`".the|n..echo |
|00003250| 73 68 61 72 3a 20 65 72 | 72 6f 72 20 74 72 61 6e |shar: er|ror tran|
|00003260| 73 6d 69 74 74 69 6e 67 | 20 22 27 62 69 74 6d 61 |smitting| "'bitma|
|00003270| 70 73 2e 68 27 22 20 27 | 28 73 68 6f 75 6c 64 20 |ps.h'" '|(should |
|00003280| 68 61 76 65 20 62 65 65 | 6e 20 36 31 34 36 20 63 |have bee|n 6146 c|
|00003290| 68 61 72 61 63 74 65 72 | 73 29 27 0a 66 69 0a 66 |haracter|s)'.fi.f|
|000032a0| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|000032b0| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 65 63 68 |riting c|heck.ech|
|000032c0| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|000032d0| 6e 67 20 22 27 63 61 6c | 6c 62 61 63 6b 73 2e 63 |ng "'cal|lbacks.c|
|000032e0| 27 22 20 27 28 37 37 34 | 32 20 63 68 61 72 61 63 |'" '(774|2 charac|
|000032f0| 74 65 72 73 29 27 0a 69 | 66 20 74 65 73 74 20 2d |ters)'.i|f test -|
|00003300| 66 20 27 63 61 6c 6c 62 | 61 63 6b 73 2e 63 27 0a |f 'callb|acks.c'.|
|00003310| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|00003320| 20 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 | will no|t over-w|
|00003330| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00003340| 6c 65 20 22 27 63 61 6c | 6c 62 61 63 6b 73 2e 63 |le "'cal|lbacks.c|
|00003350| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00003360| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 63 61 6c 6c |SHAR_EOF| > 'call|
|00003370| 62 61 63 6b 73 2e 63 27 | 0a 2f 2a 0a 20 2a 20 63 |backs.c'|./*. * c|
|00003380| 61 6c 6c 62 61 63 6b 73 | 2e 63 20 20 2d 2d 20 20 |allbacks|.c -- |
|00003390| 78 72 6f 62 6f 74 73 20 | 76 31 2e 30 0a 20 2a 2f |xrobots |v1.0. */|
|000033a0| 0a 0a 23 69 6e 63 6c 75 | 64 65 20 3c 58 31 31 2f |..#inclu|de <X11/|
|000033b0| 58 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 58 |X.h>.#in|clude <X|
|000033c0| 31 31 2f 49 6e 74 72 69 | 6e 73 69 63 2e 68 3e 0a |11/Intri|nsic.h>.|
|000033d0| 23 69 6e 63 6c 75 64 65 | 20 3c 58 31 31 2f 53 74 |#include| <X11/St|
|000033e0| 72 69 6e 67 44 65 66 73 | 2e 68 3e 0a 23 69 6e 63 |ringDefs|.h>.#inc|
|000033f0| 6c 75 64 65 20 3c 6d 61 | 74 68 2e 68 3e 0a 23 69 |lude <ma|th.h>.#i|
|00003400| 6e 63 6c 75 64 65 20 22 | 67 61 6d 65 2e 68 22 0a |nclude "|game.h".|
|00003410| 23 69 6e 63 6c 75 64 65 | 20 22 63 61 6c 6c 62 61 |#include| "callba|
|00003420| 63 6b 73 2e 68 22 0a 23 | 69 6e 63 6c 75 64 65 20 |cks.h".#|include |
|00003430| 22 67 72 61 70 68 69 63 | 73 2e 68 22 0a 0a 65 78 |"graphic|s.h"..ex|
|00003440| 74 65 72 6e 20 57 69 64 | 67 65 74 20 73 6f 6e 69 |tern Wid|get soni|
|00003450| 63 5f 63 6f 6d 6d 61 6e | 64 3b 0a 0a 2f 2a 2d 2d |c_comman|d;../*--|
|00003460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003470| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000034a0| 2d 2d 2d 2d 2a 2f 0a 2f | 2a 20 45 64 69 74 6f 72 |----*/./|* Editor|
|000034b0| 69 61 6c 20 6e 6f 74 65 | 3a 20 20 46 6f 72 20 6d |ial note|: For m|
|000034c0| 6f 73 74 20 6f 66 20 74 | 68 65 20 66 75 6e 63 74 |ost of t|he funct|
|000034d0| 69 6f 6e 73 20 69 6e 20 | 74 68 69 73 20 66 69 6c |ions in |this fil|
|000034e0| 65 2c 20 63 61 6c 6c 62 | 61 63 6b 73 20 0a 20 2a |e, callb|acks . *|
|000034f0| 20 09 61 72 65 20 6e 6f | 74 68 69 6e 67 20 6d 6f | .are no|thing mo|
|00003500| 72 65 20 74 68 61 6e 20 | 6f 76 65 72 67 72 6f 77 |re than |overgrow|
|00003510| 6e 20 61 63 74 69 6f 6e | 73 2e 20 20 42 6f 74 68 |n action|s. Both|
|00003520| 20 61 72 65 20 75 73 65 | 64 20 61 6e 64 0a 20 2a | are use|d and. *|
|00003530| 09 6e 65 65 64 65 64 2e | 20 20 55 6e 66 6f 72 74 |.needed.| Unfort|
|00003540| 75 6e 61 74 65 6c 79 2c | 20 74 68 65 72 65 27 73 |unately,| there's|
|00003550| 20 61 6c 6f 74 20 6f 66 | 20 62 6f 69 6c 65 72 70 | alot of| boilerp|
|00003560| 6c 61 74 65 20 6f 76 65 | 72 68 65 61 64 2e 0a 20 |late ove|rhead.. |
|00003570| 2a 20 09 41 63 74 75 61 | 6c 6c 79 2c 20 61 6c 6c |* .Actua|lly, all|
|00003580| 20 74 68 69 73 20 63 6f | 75 6c 64 20 62 65 20 64 | this co|uld be d|
|00003590| 6f 6e 65 20 77 69 74 68 | 6f 75 74 20 61 6e 79 20 |one with|out any |
|000035a0| 63 61 6c 6c 62 61 63 6b | 73 2e 0a 20 2a 2f 0a 0a |callback|s.. */..|
|000035b0| 2f 2a 41 52 47 53 55 53 | 45 44 2a 2f 0a 58 74 43 |/*ARGSUS|ED*/.XtC|
|000035c0| 61 6c 6c 62 61 63 6b 50 | 72 6f 63 0a 74 65 6c 65 |allbackP|roc.tele|
|000035d0| 70 6f 72 74 5f 63 61 6c | 6c 62 61 63 6b 28 77 69 |port_cal|lback(wi|
|000035e0| 64 67 65 74 2c 63 6c 6f | 73 75 72 65 2c 63 61 6c |dget,clo|sure,cal|
|000035f0| 6c 44 61 74 61 29 0a 20 | 20 57 69 64 67 65 74 20 |lData). | Widget |
|00003600| 77 69 64 67 65 74 3b 0a | 20 20 63 61 64 64 72 5f |widget;.| caddr_|
|00003610| 74 20 63 6c 6f 73 75 72 | 65 3b 0a 20 20 63 61 64 |t closur|e;. cad|
|00003620| 64 72 5f 74 20 63 61 6c | 6c 44 61 74 61 3b 0a 7b |dr_t cal|lData;.{|
|00003630| 0a 20 20 74 65 6c 65 70 | 6f 72 74 28 29 3b 0a 7d |. telep|ort();.}|
|00003640| 0a 0a 2f 2a 41 52 47 53 | 55 53 45 44 2a 2f 0a 73 |../*ARGS|USED*/.s|
|00003650| 74 61 74 69 63 20 58 74 | 41 63 74 69 6f 6e 50 72 |tatic Xt|ActionPr|
|00003660| 6f 63 0a 74 65 6c 65 70 | 6f 72 74 5f 61 63 74 69 |oc.telep|ort_acti|
|00003670| 6f 6e 28 77 2c 65 76 65 | 6e 74 2c 70 61 72 61 6d |on(w,eve|nt,param|
|00003680| 73 2c 6e 75 6d 5f 70 61 | 72 61 6d 73 29 0a 20 20 |s,num_pa|rams). |
|00003690| 57 69 64 67 65 74 20 77 | 3b 0a 20 20 58 45 76 65 |Widget w|;. XEve|
|000036a0| 6e 74 20 2a 65 76 65 6e | 74 3b 0a 20 20 53 74 72 |nt *even|t;. Str|
|000036b0| 69 6e 67 20 2a 70 61 72 | 61 6d 73 3b 0a 20 20 43 |ing *par|ams;. C|
|000036c0| 61 72 64 69 6e 61 6c 20 | 2a 6e 75 6d 5f 70 61 72 |ardinal |*num_par|
|000036d0| 61 6d 73 3b 0a 7b 0a 20 | 20 74 65 6c 65 70 6f 72 |ams;.{. | telepor|
|000036e0| 74 28 29 3b 0a 7d 0a 0a | 0a 2f 2a 41 52 47 53 55 |t();.}..|./*ARGSU|
|000036f0| 53 45 44 2a 2f 0a 58 74 | 43 61 6c 6c 62 61 63 6b |SED*/.Xt|Callback|
|00003700| 50 72 6f 63 0a 77 61 69 | 74 5f 63 61 6c 6c 62 61 |Proc.wai|t_callba|
|00003710| 63 6b 28 77 69 64 67 65 | 74 2c 63 6c 6f 73 75 72 |ck(widge|t,closur|
|00003720| 65 2c 63 61 6c 6c 44 61 | 74 61 29 0a 20 20 57 69 |e,callDa|ta). Wi|
|00003730| 64 67 65 74 20 77 69 64 | 67 65 74 3b 0a 20 20 63 |dget wid|get;. c|
|00003740| 61 64 64 72 5f 74 20 63 | 6c 6f 73 75 72 65 3b 0a |addr_t c|losure;.|
|00003750| 20 20 63 61 64 64 72 5f | 74 20 63 61 6c 6c 44 61 | caddr_|t callDa|
|00003760| 74 61 3b 0a 7b 0a 20 20 | 77 61 69 74 5f 66 6f 72 |ta;.{. |wait_for|
|00003770| 5f 65 6d 28 29 3b 0a 7d | 0a 0a 0a 2f 2a 41 52 47 |_em();.}|.../*ARG|
|00003780| 53 55 53 45 44 2a 2f 0a | 73 74 61 74 69 63 20 58 |SUSED*/.|static X|
|00003790| 74 41 63 74 69 6f 6e 50 | 72 6f 63 0a 77 61 69 74 |tActionP|roc.wait|
|000037a0| 5f 61 63 74 69 6f 6e 28 | 77 2c 65 76 65 6e 74 2c |_action(|w,event,|
|000037b0| 70 61 72 61 6d 73 2c 6e | 75 6d 5f 70 61 72 61 6d |params,n|um_param|
|000037c0| 73 29 0a 20 20 57 69 64 | 67 65 74 20 77 3b 0a 20 |s). Wid|get w;. |
|000037d0| 20 58 45 76 65 6e 74 20 | 2a 65 76 65 6e 74 3b 0a | XEvent |*event;.|
|000037e0| 20 20 53 74 72 69 6e 67 | 20 2a 70 61 72 61 6d 73 | String| *params|
|000037f0| 3b 0a 20 20 43 61 72 64 | 69 6e 61 6c 20 2a 6e 75 |;. Card|inal *nu|
|00003800| 6d 5f 70 61 72 61 6d 73 | 3b 0a 7b 0a 20 20 77 61 |m_params|;.{. wa|
|00003810| 69 74 5f 66 6f 72 5f 65 | 6d 28 29 3b 0a 7d 0a 0a |it_for_e|m();.}..|
|00003820| 0a 0a 2f 2a 41 52 47 53 | 55 53 45 44 2a 2f 0a 58 |../*ARGS|USED*/.X|
|00003830| 74 43 61 6c 6c 62 61 63 | 6b 50 72 6f 63 0a 73 6f |tCallbac|kProc.so|
|00003840| 6e 69 63 5f 63 61 6c 6c | 62 61 63 6b 28 77 69 64 |nic_call|back(wid|
|00003850| 67 65 74 2c 63 6c 6f 73 | 75 72 65 2c 63 61 6c 6c |get,clos|ure,call|
|00003860| 44 61 74 61 29 0a 20 20 | 57 69 64 67 65 74 20 77 |Data). |Widget w|
|00003870| 69 64 67 65 74 3b 0a 20 | 20 63 61 64 64 72 5f 74 |idget;. | caddr_t|
|00003880| 20 63 6c 6f 73 75 72 65 | 3b 0a 20 20 63 61 64 64 | closure|;. cadd|
|00003890| 72 5f 74 20 63 61 6c 6c | 44 61 74 61 3b 0a 7b 0a |r_t call|Data;.{.|
|000038a0| 20 20 73 74 61 74 69 63 | 20 41 72 67 20 61 72 67 | static| Arg arg|
|000038b0| 20 3d 20 7b 20 58 74 4e | 73 65 6e 73 69 74 69 76 | = { XtN|sensitiv|
|000038c0| 65 2c 20 46 61 6c 73 65 | 7d 3b 0a 20 20 69 66 28 |e, False|};. if(|
|000038d0| 21 67 61 6d 65 5f 61 63 | 74 69 76 65 29 20 72 65 |!game_ac|tive) re|
|000038e0| 74 75 72 6e 3b 0a 20 20 | 58 74 53 65 74 56 61 6c |turn;. |XtSetVal|
|000038f0| 75 65 73 28 73 6f 6e 69 | 63 5f 63 6f 6d 6d 61 6e |ues(soni|c_comman|
|00003900| 64 2c 26 61 72 67 2c 31 | 29 3b 0a 20 20 73 6f 6e |d,&arg,1|);. son|
|00003910| 69 63 5f 73 63 72 65 77 | 64 72 69 76 65 72 28 29 |ic_screw|driver()|
|00003920| 3b 0a 7d 0a 0a 2f 2a 41 | 52 47 53 55 53 45 44 2a |;.}../*A|RGSUSED*|
|00003930| 2f 0a 73 74 61 74 69 63 | 20 58 74 41 63 74 69 6f |/.static| XtActio|
|00003940| 6e 50 72 6f 63 0a 73 6f | 6e 69 63 5f 61 63 74 69 |nProc.so|nic_acti|
|00003950| 6f 6e 28 77 2c 65 76 65 | 6e 74 2c 70 61 72 61 6d |on(w,eve|nt,param|
|00003960| 73 2c 6e 75 6d 5f 70 61 | 72 61 6d 73 29 0a 20 20 |s,num_pa|rams). |
|00003970| 57 69 64 67 65 74 20 77 | 3b 0a 20 20 58 45 76 65 |Widget w|;. XEve|
|00003980| 6e 74 20 2a 65 76 65 6e | 74 3b 0a 20 20 53 74 72 |nt *even|t;. Str|
|00003990| 69 6e 67 20 2a 70 61 72 | 61 6d 73 3b 0a 20 20 43 |ing *par|ams;. C|
|000039a0| 61 72 64 69 6e 61 6c 20 | 2a 6e 75 6d 5f 70 61 72 |ardinal |*num_par|
|000039b0| 61 6d 73 3b 0a 7b 0a 20 | 20 73 74 61 74 69 63 20 |ams;.{. | static |
|000039c0| 41 72 67 20 61 72 67 20 | 3d 20 7b 20 58 74 4e 73 |Arg arg |= { XtNs|
|000039d0| 65 6e 73 69 74 69 76 65 | 2c 20 46 61 6c 73 65 7d |ensitive|, False}|
|000039e0| 3b 0a 20 20 69 66 28 21 | 67 61 6d 65 5f 61 63 74 |;. if(!|game_act|
|000039f0| 69 76 65 29 20 72 65 74 | 75 72 6e 3b 0a 20 20 58 |ive) ret|urn;. X|
|00003a00| 74 53 65 74 56 61 6c 75 | 65 73 28 73 6f 6e 69 63 |tSetValu|es(sonic|
|00003a10| 5f 63 6f 6d 6d 61 6e 64 | 2c 26 61 72 67 2c 31 29 |_command|,&arg,1)|
|00003a20| 3b 0a 20 20 73 6f 6e 69 | 63 5f 73 63 72 65 77 64 |;. soni|c_screwd|
|00003a30| 72 69 76 65 72 28 29 3b | 0a 7d 0a 0a 0a 76 6f 69 |river();|.}...voi|
|00003a40| 64 0a 72 65 73 65 74 5f | 73 6f 6e 69 63 5f 62 75 |d.reset_|sonic_bu|
|00003a50| 74 74 6f 6e 28 29 0a 7b | 0a 20 20 73 74 61 74 69 |tton().{|. stati|
|00003a60| 63 20 41 72 67 20 61 72 | 67 20 3d 20 7b 20 58 74 |c Arg ar|g = { Xt|
|00003a70| 4e 73 65 6e 73 69 74 69 | 76 65 2c 20 54 72 75 65 |Nsensiti|ve, True|
|00003a80| 20 7d 3b 0a 20 20 58 74 | 53 65 74 56 61 6c 75 65 | };. Xt|SetValue|
|00003a90| 73 28 73 6f 6e 69 63 5f | 63 6f 6d 6d 61 6e 64 2c |s(sonic_|command,|
|00003aa0| 26 61 72 67 2c 31 29 3b | 0a 7d 0a 0a 0a 2f 2a 41 |&arg,1);|.}.../*A|
|00003ab0| 52 47 53 55 53 45 44 2a | 2f 0a 58 74 43 61 6c 6c |RGSUSED*|/.XtCall|
|00003ac0| 62 61 63 6b 50 72 6f 63 | 0a 6e 65 77 5f 67 61 6d |backProc|.new_gam|
|00003ad0| 65 5f 63 61 6c 6c 62 61 | 63 6b 28 77 69 64 67 65 |e_callba|ck(widge|
|00003ae0| 74 2c 63 6c 6f 73 75 72 | 65 2c 63 61 6c 6c 44 61 |t,closur|e,callDa|
|00003af0| 74 61 29 0a 20 20 57 69 | 64 67 65 74 20 77 69 64 |ta). Wi|dget wid|
|00003b00| 67 65 74 3b 0a 20 20 63 | 61 64 64 72 5f 74 20 63 |get;. c|addr_t c|
|00003b10| 6c 6f 73 75 72 65 3b 0a | 20 20 63 61 64 64 72 5f |losure;.| caddr_|
|00003b20| 74 20 63 61 6c 6c 44 61 | 74 61 3b 0a 7b 0a 20 20 |t callDa|ta;.{. |
|00003b30| 6e 65 77 5f 67 61 6d 65 | 28 29 3b 0a 7d 0a 0a 0a |new_game|();.}...|
|00003b40| 2f 2a 41 52 47 53 55 53 | 45 44 2a 2f 0a 73 74 61 |/*ARGSUS|ED*/.sta|
|00003b50| 74 69 63 20 58 74 41 63 | 74 69 6f 6e 50 72 6f 63 |tic XtAc|tionProc|
|00003b60| 0a 6e 65 77 5f 67 61 6d | 65 5f 61 63 74 69 6f 6e |.new_gam|e_action|
|00003b70| 28 77 2c 65 76 65 6e 74 | 2c 70 61 72 61 6d 73 2c |(w,event|,params,|
|00003b80| 6e 75 6d 5f 70 61 72 61 | 6d 73 29 0a 20 20 57 69 |num_para|ms). Wi|
|00003b90| 64 67 65 74 20 77 3b 0a | 20 20 58 45 76 65 6e 74 |dget w;.| XEvent|
|00003ba0| 20 2a 65 76 65 6e 74 3b | 0a 20 20 53 74 72 69 6e | *event;|. Strin|
|00003bb0| 67 20 2a 70 61 72 61 6d | 73 3b 0a 20 20 43 61 72 |g *param|s;. Car|
|00003bc0| 64 69 6e 61 6c 20 2a 6e | 75 6d 5f 70 61 72 61 6d |dinal *n|um_param|
|00003bd0| 73 3b 0a 7b 0a 20 20 6e | 65 77 5f 67 61 6d 65 28 |s;.{. n|ew_game(|
|00003be0| 29 3b 0a 7d 0a 0a 0a 2f | 2a 41 52 47 53 55 53 45 |);.}.../|*ARGSUSE|
|00003bf0| 44 2a 2f 0a 58 74 43 61 | 6c 6c 62 61 63 6b 50 72 |D*/.XtCa|llbackPr|
|00003c00| 6f 63 0a 71 75 69 74 5f | 63 61 6c 6c 62 61 63 6b |oc.quit_|callback|
|00003c10| 28 77 69 64 67 65 74 2c | 63 6c 6f 73 75 72 65 2c |(widget,|closure,|
|00003c20| 63 61 6c 6c 44 61 74 61 | 29 0a 20 20 57 69 64 67 |callData|). Widg|
|00003c30| 65 74 20 77 69 64 67 65 | 74 3b 0a 20 20 63 61 64 |et widge|t;. cad|
|00003c40| 64 72 5f 74 20 63 6c 6f | 73 75 72 65 3b 0a 20 20 |dr_t clo|sure;. |
|00003c50| 63 61 64 64 72 5f 74 20 | 63 61 6c 6c 44 61 74 61 |caddr_t |callData|
|00003c60| 3b 0a 7b 0a 20 71 75 69 | 74 5f 67 61 6d 65 28 29 |;.{. qui|t_game()|
|00003c70| 3b 0a 7d 0a 0a 2f 2a 41 | 52 47 53 55 53 45 44 2a |;.}../*A|RGSUSED*|
|00003c80| 2f 0a 73 74 61 74 69 63 | 20 58 74 41 63 74 69 6f |/.static| XtActio|
|00003c90| 6e 50 72 6f 63 0a 71 75 | 69 74 5f 61 63 74 69 6f |nProc.qu|it_actio|
|00003ca0| 6e 28 77 2c 65 76 65 6e | 74 2c 70 61 72 61 6d 73 |n(w,even|t,params|
|00003cb0| 2c 6e 75 6d 5f 70 61 72 | 61 6d 73 29 0a 20 20 57 |,num_par|ams). W|
|00003cc0| 69 64 67 65 74 20 77 3b | 0a 20 20 58 45 76 65 6e |idget w;|. XEven|
|00003cd0| 74 20 2a 65 76 65 6e 74 | 3b 0a 20 20 53 74 72 69 |t *event|;. Stri|
|00003ce0| 6e 67 20 2a 70 61 72 61 | 6d 73 3b 0a 20 20 43 61 |ng *para|ms;. Ca|
|00003cf0| 72 64 69 6e 61 6c 20 2a | 6e 75 6d 5f 70 61 72 61 |rdinal *|num_para|
|00003d00| 6d 73 3b 0a 7b 0a 20 20 | 71 75 69 74 5f 67 61 6d |ms;.{. |quit_gam|
|00003d10| 65 28 29 3b 0a 7d 0a 0a | 0a 2f 2a 41 52 47 53 55 |e();.}..|./*ARGSU|
|00003d20| 53 45 44 2a 2f 0a 73 74 | 61 74 69 63 20 58 74 41 |SED*/.st|atic XtA|
|00003d30| 63 74 69 6f 6e 50 72 6f | 63 0a 64 6f 5f 6e 6f 74 |ctionPro|c.do_not|
|00003d40| 68 69 6e 67 5f 61 63 74 | 69 6f 6e 28 77 2c 65 76 |hing_act|ion(w,ev|
|00003d50| 65 6e 74 2c 70 61 72 61 | 6d 73 2c 6e 75 6d 5f 70 |ent,para|ms,num_p|
|00003d60| 61 72 61 6d 73 29 0a 20 | 20 57 69 64 67 65 74 20 |arams). | Widget |
|00003d70| 77 3b 0a 20 20 58 45 76 | 65 6e 74 20 2a 65 76 65 |w;. XEv|ent *eve|
|00003d80| 6e 74 3b 0a 20 20 53 74 | 72 69 6e 67 20 2a 70 61 |nt;. St|ring *pa|
|00003d90| 72 61 6d 73 3b 0a 20 20 | 43 61 72 64 69 6e 61 6c |rams;. |Cardinal|
|00003da0| 20 2a 6e 75 6d 5f 70 61 | 72 61 6d 73 3b 0a 7b 0a | *num_pa|rams;.{.|
|00003db0| 20 20 2f 2a 20 64 6f 20 | 6e 6f 74 68 69 6e 67 20 | /* do |nothing |
|00003dc0| 2a 2f 0a 7d 0a 0a 0a 0a | 2f 2a 2d 2d 2d 2d 2d 2d |*/.}....|/*------|
|00003dd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003de0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003df0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e10| 2a 2f 0a 0a 0a 69 6e 74 | 20 0a 64 65 74 65 72 6d |*/...int| .determ|
|00003e20| 69 6e 65 5f 64 69 72 65 | 63 74 69 6f 6e 28 62 75 |ine_dire|ction(bu|
|00003e30| 74 74 6f 6e 5f 78 2c 62 | 75 74 74 6f 6e 5f 79 29 |tton_x,b|utton_y)|
|00003e40| 0a 20 20 69 6e 74 20 62 | 75 74 74 6f 6e 5f 78 2c |. int b|utton_x,|
|00003e50| 62 75 74 74 6f 6e 5f 79 | 3b 0a 7b 0a 2f 2a 20 0a |button_y|;.{./* .|
|00003e60| 20 2a 20 47 69 76 65 6e | 20 74 68 65 20 6d 6f 75 | * Given| the mou|
|00003e70| 73 65 27 73 20 78 26 79 | 20 70 6f 73 69 74 69 6f |se's x&y| positio|
|00003e80| 6e 2c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |n, this |routine |
|00003e90| 64 65 74 65 72 6d 69 6e | 65 73 20 74 68 65 20 64 |determin|es the d|
|00003ea0| 69 72 65 63 74 69 6f 6e | 0a 20 2a 20 72 65 6c 61 |irection|. * rela|
|00003eb0| 74 69 76 65 20 74 6f 20 | 74 68 65 20 70 6c 61 79 |tive to |the play|
|00003ec0| 65 72 2c 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |er, and |returns |
|00003ed0| 74 68 65 20 72 65 73 75 | 6c 74 20 63 6f 64 65 64 |the resu|lt coded|
|00003ee0| 20 69 6e 74 6f 20 61 20 | 69 6e 74 2e 0a 20 2a 2f | into a |int.. */|
|00003ef0| 0a 20 20 66 6c 6f 61 74 | 20 73 6c 6f 70 65 2c 20 |. float| slope, |
|00003f00| 69 6e 76 73 6c 6f 70 65 | 3b 0a 20 20 69 6e 74 20 |invslope|;. int |
|00003f10| 64 69 72 65 63 74 69 6f | 6e 20 3d 20 30 3b 0a 20 |directio|n = 0;. |
|00003f20| 20 69 6e 74 20 63 6f 6f | 72 64 5f 78 20 3d 20 70 | int coo|rd_x = p|
|00003f30| 6f 73 5f 74 6f 5f 63 6f | 6f 72 64 28 68 75 6d 61 |os_to_co|ord(huma|
|00003f40| 6e 5f 78 29 20 2b 20 43 | 45 4c 4c 53 49 5a 45 2f |n_x) + C|ELLSIZE/|
|00003f50| 32 2c 0a 20 20 20 20 20 | 20 63 6f 6f 72 64 5f 79 |2,. | coord_y|
|00003f60| 20 3d 20 70 6f 73 5f 74 | 6f 5f 63 6f 6f 72 64 28 | = pos_t|o_coord(|
|00003f70| 68 75 6d 61 6e 5f 79 29 | 20 2b 20 43 45 4c 4c 53 |human_y)| + CELLS|
|00003f80| 49 5a 45 2f 32 3b 0a 0a | 20 20 69 66 28 20 28 61 |IZE/2;..| if( (a|
|00003f90| 62 73 28 63 6f 6f 72 64 | 5f 78 20 2d 20 62 75 74 |bs(coord|_x - but|
|00003fa0| 74 6f 6e 5f 78 29 20 3c | 20 28 43 45 4c 4c 53 49 |ton_x) <| (CELLSI|
|00003fb0| 5a 45 2f 32 29 2b 32 29 | 20 26 26 0a 20 20 20 20 |ZE/2)+2)| &&. |
|00003fc0| 20 20 28 61 62 73 28 63 | 6f 6f 72 64 5f 79 20 2d | (abs(c|oord_y -|
|00003fd0| 20 62 75 74 74 6f 6e 5f | 79 29 20 3c 20 28 43 45 | button_|y) < (CE|
|00003fe0| 4c 4c 53 49 5a 45 2f 32 | 29 2b 32 29 29 20 0a 20 |LLSIZE/2|)+2)) . |
|00003ff0| 20 20 20 72 65 74 75 72 | 6e 28 53 54 49 4c 4c 29 | retur|n(STILL)|
|00004000| 3b 20 20 20 20 20 20 2f | 2a 20 63 75 72 73 6f 72 |; /|* cursor|
|00004010| 20 69 73 20 64 69 72 65 | 63 74 6c 79 20 6f 76 65 | is dire|ctly ove|
|00004020| 72 20 74 68 65 20 70 6c | 61 79 65 72 20 2a 2f 20 |r the pl|ayer */ |
|00004030| 0a 0a 20 20 69 66 28 62 | 75 74 74 6f 6e 5f 78 20 |.. if(b|utton_x |
|00004040| 2d 20 63 6f 6f 72 64 5f | 78 20 21 3d 20 30 29 20 |- coord_|x != 0) |
|00004050| 7b 0a 20 20 20 20 73 6c | 6f 70 65 20 3d 20 66 61 |{. sl|ope = fa|
|00004060| 62 73 28 28 66 6c 6f 61 | 74 29 28 62 75 74 74 6f |bs((floa|t)(butto|
|00004070| 6e 5f 79 20 2d 20 63 6f | 6f 72 64 5f 79 29 20 2f |n_y - co|ord_y) /|
|00004080| 20 28 66 6c 6f 61 74 29 | 28 62 75 74 74 6f 6e 5f | (float)|(button_|
|00004090| 78 20 2d 20 63 6f 6f 72 | 64 5f 78 29 29 3b 20 0a |x - coor|d_x)); .|
|000040a0| 0a 20 20 20 20 69 66 28 | 20 62 75 74 74 6f 6e 5f |. if(| button_|
|000040b0| 78 20 3e 20 63 6f 6f 72 | 64 5f 78 20 29 20 7b 09 |x > coor|d_x ) {.|
|000040c0| 09 09 2f 2a 20 69 6e 20 | 63 6f 6f 72 64 69 6e 61 |../* in |coordina|
|000040d0| 74 65 73 20 31 20 6f 72 | 20 34 20 2a 2f 0a 20 20 |tes 1 or| 4 */. |
|000040e0| 20 20 20 20 69 66 28 20 | 28 73 6c 6f 70 65 20 3c | if( |(slope <|
|000040f0| 20 32 29 20 26 26 20 28 | 68 75 6d 61 6e 5f 78 20 | 2) && (|human_x |
|00004100| 3c 20 4d 41 58 58 29 20 | 29 0a 20 20 20 20 20 20 |< MAXX) |). |
|00004110| 20 20 64 69 72 65 63 74 | 69 6f 6e 20 3d 20 52 49 | direct|ion = RI|
|00004120| 47 48 54 3b 0a 20 20 20 | 20 7d 0a 20 20 20 20 65 |GHT;. | }. e|
|00004130| 6c 73 65 20 09 09 09 09 | 09 2f 2a 20 69 6e 20 63 |lse ....|./* in c|
|00004140| 6f 6f 72 64 69 6e 61 74 | 65 73 20 32 20 6f 72 20 |oordinat|es 2 or |
|00004150| 33 20 2a 2f 0a 20 20 20 | 20 20 20 69 66 28 20 28 |3 */. | if( (|
|00004160| 73 6c 6f 70 65 20 3c 20 | 32 29 20 26 26 20 28 68 |slope < |2) && (h|
|00004170| 75 6d 61 6e 5f 78 20 3e | 20 2d 31 29 20 29 0a 20 |uman_x >| -1) ). |
|00004180| 20 20 20 20 20 20 20 64 | 69 72 65 63 74 69 6f 6e | d|irection|
|00004190| 20 3d 20 4c 45 46 54 3b | 0a 20 20 7d 0a 0a 20 20 | = LEFT;|. }.. |
|000041a0| 69 66 28 62 75 74 74 6f | 6e 5f 79 20 2d 20 63 6f |if(butto|n_y - co|
|000041b0| 6f 72 64 5f 79 20 21 3d | 20 30 29 20 7b 0a 20 20 |ord_y !=| 0) {. |
|000041c0| 20 20 69 6e 76 73 6c 6f | 70 65 20 3d 20 66 61 62 | invslo|pe = fab|
|000041d0| 73 28 28 66 6c 6f 61 74 | 29 28 62 75 74 74 6f 6e |s((float|)(button|
|000041e0| 5f 78 20 2d 20 63 6f 6f | 72 64 5f 78 29 20 2f 20 |_x - coo|rd_x) / |
|000041f0| 28 66 6c 6f 61 74 29 28 | 62 75 74 74 6f 6e 5f 79 |(float)(|button_y|
|00004200| 20 2d 20 63 6f 6f 72 64 | 5f 79 29 29 3b 20 0a 0a | - coord|_y)); ..|
|00004210| 20 20 20 20 69 66 28 20 | 62 75 74 74 6f 6e 5f 79 | if( |button_y|
|00004220| 20 3e 20 63 6f 6f 72 64 | 5f 79 20 29 20 7b 09 09 | > coord|_y ) {..|
|00004230| 09 2f 2a 20 69 6e 20 63 | 6f 6f 72 64 69 6e 61 74 |./* in c|oordinat|
|00004240| 65 73 20 31 20 6f 72 20 | 32 20 2a 2f 0a 20 20 20 |es 1 or |2 */. |
|00004250| 20 20 20 69 66 28 20 28 | 69 6e 76 73 6c 6f 70 65 | if( (|invslope|
|00004260| 20 3c 20 32 29 20 26 26 | 20 28 68 75 6d 61 6e 5f | < 2) &&| (human_|
|00004270| 79 20 3c 20 4d 41 58 59 | 29 20 29 0a 20 20 20 20 |y < MAXY|) ). |
|00004280| 20 20 20 20 64 69 72 65 | 63 74 69 6f 6e 20 7c 3d | dire|ction |=|
|00004290| 20 44 4f 57 4e 3b 0a 20 | 20 20 20 7d 0a 0a 20 20 | DOWN;. | }.. |
|000042a0| 20 20 65 6c 73 65 20 09 | 09 09 09 09 2f 2a 20 69 | else .|..../* i|
|000042b0| 6e 20 63 6f 6f 72 64 69 | 6e 61 74 65 73 20 33 20 |n coordi|nates 3 |
|000042c0| 6f 72 20 34 20 2a 2f 0a | 20 20 20 20 20 20 69 66 |or 4 */.| if|
|000042d0| 28 20 28 69 6e 76 73 6c | 6f 70 65 20 3c 20 32 29 |( (invsl|ope < 2)|
|000042e0| 20 26 26 20 28 68 75 6d | 61 6e 5f 79 20 3e 20 2d | && (hum|an_y > -|
|000042f0| 31 29 20 29 0a 20 20 20 | 20 20 20 20 20 64 69 72 |1) ). | dir|
|00004300| 65 63 74 69 6f 6e 20 7c | 3d 20 55 50 3b 0a 20 20 |ection ||= UP;. |
|00004310| 7d 0a 20 20 72 65 74 75 | 72 6e 28 64 69 72 65 63 |}. retu|rn(direc|
|00004320| 74 69 6f 6e 29 3b 0a 7d | 0a 0a 0a 0a 2f 2a 2d 2d |tion);.}|..../*--|
|00004330| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004340| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004350| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004360| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004370| 2d 2d 2d 2d 2a 2f 0a 0a | 0a 2f 2a 41 52 47 53 55 |----*/..|./*ARGSU|
|00004380| 53 45 44 2a 2f 0a 73 74 | 61 74 69 63 20 58 74 41 |SED*/.st|atic XtA|
|00004390| 63 74 69 6f 6e 50 72 6f | 63 0a 6d 6f 76 65 5f 61 |ctionPro|c.move_a|
|000043a0| 63 74 69 6f 6e 28 77 2c | 65 76 65 6e 74 2c 70 61 |ction(w,|event,pa|
|000043b0| 72 61 6d 73 2c 6e 75 6d | 5f 70 61 72 61 6d 73 29 |rams,num|_params)|
|000043c0| 0a 20 20 57 69 64 67 65 | 74 20 77 3b 0a 20 20 58 |. Widge|t w;. X|
|000043d0| 42 75 74 74 6f 6e 45 76 | 65 6e 74 20 2a 65 76 65 |ButtonEv|ent *eve|
|000043e0| 6e 74 3b 0a 20 20 53 74 | 72 69 6e 67 20 2a 70 61 |nt;. St|ring *pa|
|000043f0| 72 61 6d 73 3b 0a 20 20 | 43 61 72 64 69 6e 61 6c |rams;. |Cardinal|
|00004400| 20 2a 6e 75 6d 5f 70 61 | 72 61 6d 73 3b 0a 7b 0a | *num_pa|rams;.{.|
|00004410| 2f 2a 20 0a 20 2a 20 20 | 43 61 6c 6c 65 64 20 74 |/* . * |Called t|
|00004420| 6f 20 6d 6f 76 65 20 74 | 68 65 20 70 6c 61 79 65 |o move t|he playe|
|00004430| 72 27 73 20 69 63 6f 6e | 2e 20 20 54 68 69 73 20 |r's icon|. This |
|00004440| 61 63 74 69 6f 6e 20 63 | 61 6e 20 62 65 20 63 61 |action c|an be ca|
|00004450| 6c 6c 65 64 20 0a 20 2a | 20 20 77 68 65 6e 20 61 |lled . *| when a|
|00004460| 20 6d 6f 75 73 65 20 62 | 75 74 74 6f 6e 20 69 73 | mouse b|utton is|
|00004470| 20 70 72 65 73 73 65 64 | 20 6f 72 20 77 68 65 6e | pressed| or when|
|00004480| 20 61 20 6b 65 79 20 69 | 73 20 70 72 65 73 73 65 | a key i|s presse|
|00004490| 64 2e 0a 20 2a 20 20 54 | 68 69 73 20 69 73 20 61 |d.. * T|his is a|
|000044a0| 6c 6c 20 64 65 70 65 6e | 64 65 6e 74 20 6f 6e 20 |ll depen|dent on |
|000044b0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 74 72 61 6e |the curr|ent tran|
|000044c0| 73 6c 61 74 69 6f 6e 73 | 2e 0a 20 2a 2f 0a 20 20 |slations|.. */. |
|000044d0| 69 6e 74 20 64 69 72 65 | 63 74 69 6f 6e 3b 0a 20 |int dire|ction;. |
|000044e0| 20 69 6e 74 20 74 6d 70 | 5f 68 75 6d 61 6e 5f 78 | int tmp|_human_x|
|000044f0| 20 3d 20 68 75 6d 61 6e | 5f 78 2c 20 74 6d 70 5f | = human|_x, tmp_|
|00004500| 68 75 6d 61 6e 5f 79 20 | 3d 20 68 75 6d 61 6e 5f |human_y |= human_|
|00004510| 79 3b 0a 20 20 69 6e 74 | 20 6e 75 6d 5f 77 61 73 |y;. int| num_was|
|00004520| 74 65 64 3b 0a 20 20 69 | 6e 74 20 70 61 72 61 6d |ted;. i|nt param|
|00004530| 5f 63 6f 75 6e 74 20 3d | 20 2a 6e 75 6d 5f 70 61 |_count =| *num_pa|
|00004540| 72 61 6d 73 3b 0a 0a 20 | 20 69 66 28 21 67 61 6d |rams;.. | if(!gam|
|00004550| 65 5f 61 63 74 69 76 65 | 29 20 72 65 74 75 72 6e |e_active|) return|
|00004560| 3b 0a 0a 20 20 69 66 28 | 21 2a 6e 75 6d 5f 70 61 |;.. if(|!*num_pa|
|00004570| 72 61 6d 73 29 20 7b 09 | 2f 2a 20 6e 6f 20 70 61 |rams) {.|/* no pa|
|00004580| 72 61 6d 65 74 65 72 73 | 20 2d 20 75 73 65 20 74 |rameters| - use t|
|00004590| 68 65 20 6d 6f 75 73 65 | 20 70 6f 69 6e 74 65 72 |he mouse| pointer|
|000045a0| 20 2a 2f 0a 0a 20 20 20 | 20 64 69 72 65 63 74 69 | */.. | directi|
|000045b0| 6f 6e 20 3d 20 64 65 74 | 65 72 6d 69 6e 65 5f 64 |on = det|ermine_d|
|000045c0| 69 72 65 63 74 69 6f 6e | 28 65 76 65 6e 74 2d 3e |irection|(event->|
|000045d0| 78 2c 65 76 65 6e 74 2d | 3e 79 29 3b 0a 20 20 20 |x,event-|>y);. |
|000045e0| 20 69 66 28 21 64 69 72 | 65 63 74 69 6f 6e 29 20 | if(!dir|ection) |
|000045f0| 20 72 65 74 75 72 6e 3b | 0a 0a 20 20 20 20 69 66 | return;|.. if|
|00004600| 28 64 69 72 65 63 74 69 | 6f 6e 20 26 20 55 50 29 |(directi|on & UP)|
|00004610| 20 20 20 20 74 6d 70 5f | 68 75 6d 61 6e 5f 79 2d | tmp_|human_y-|
|00004620| 2d 3b 0a 20 20 20 20 69 | 66 28 64 69 72 65 63 74 |-;. i|f(direct|
|00004630| 69 6f 6e 20 26 20 44 4f | 57 4e 29 20 20 74 6d 70 |ion & DO|WN) tmp|
|00004640| 5f 68 75 6d 61 6e 5f 79 | 2b 2b 3b 0a 20 20 20 20 |_human_y|++;. |
|00004650| 69 66 28 64 69 72 65 63 | 74 69 6f 6e 20 26 20 4c |if(direc|tion & L|
|00004660| 45 46 54 29 20 20 74 6d | 70 5f 68 75 6d 61 6e 5f |EFT) tm|p_human_|
|00004670| 78 2d 2d 3b 0a 20 20 20 | 20 69 66 28 64 69 72 65 |x--;. | if(dire|
|00004680| 63 74 69 6f 6e 20 26 20 | 52 49 47 48 54 29 20 74 |ction & |RIGHT) t|
|00004690| 6d 70 5f 68 75 6d 61 6e | 5f 78 2b 2b 3b 0a 0a 20 |mp_human|_x++;.. |
|000046a0| 20 7d 20 65 6c 73 65 20 | 0a 0a 20 20 20 20 77 68 | } else |.. wh|
|000046b0| 69 6c 65 28 70 61 72 61 | 6d 5f 63 6f 75 6e 74 2d |ile(para|m_count-|
|000046c0| 2d 29 20 7b 0a 20 20 20 | 20 20 20 2f 2a 20 65 6c |-) {. | /* el|
|000046d0| 73 65 20 70 75 6c 6c 20 | 74 68 65 20 64 69 72 65 |se pull |the dire|
|000046e0| 63 74 69 6f 6e 20 6f 75 | 74 20 6f 66 20 74 68 65 |ction ou|t of the|
|000046f0| 20 70 61 72 61 6d 65 74 | 65 72 73 2e 20 2a 2f 0a | paramet|ers. */.|
|00004700| 20 20 20 20 20 20 2f 2a | 20 79 6f 75 20 63 61 6e | /*| you can|
|00004710| 20 27 63 68 65 61 74 27 | 20 68 65 72 65 2e 2e 2e | 'cheat'| here...|
|00004720| 20 62 75 74 20 77 68 6f | 27 73 20 67 6f 6e 6e 61 | but who|'s gonna|
|00004730| 20 74 65 6c 6c 3f 20 2a | 2f 0a 20 20 20 20 20 20 | tell? *|/. |
|00004740| 69 66 28 21 73 74 72 63 | 6d 70 28 22 72 69 67 68 |if(!strc|mp("righ|
|00004750| 74 22 2c 2a 28 70 61 72 | 61 6d 73 2b 70 61 72 61 |t",*(par|ams+para|
|00004760| 6d 5f 63 6f 75 6e 74 29 | 29 29 0a 20 20 20 20 20 |m_count)|)). |
|00004770| 20 20 20 74 6d 70 5f 68 | 75 6d 61 6e 5f 78 2b 2b | tmp_h|uman_x++|
|00004780| 3b 0a 20 20 20 20 20 20 | 69 66 28 21 73 74 72 63 |;. |if(!strc|
|00004790| 6d 70 28 22 6c 65 66 74 | 22 2c 20 2a 28 70 61 72 |mp("left|", *(par|
|000047a0| 61 6d 73 2b 70 61 72 61 | 6d 5f 63 6f 75 6e 74 29 |ams+para|m_count)|
|000047b0| 29 29 0a 20 20 20 20 20 | 20 20 20 74 6d 70 5f 68 |)). | tmp_h|
|000047c0| 75 6d 61 6e 5f 78 2d 2d | 3b 0a 20 20 20 20 20 20 |uman_x--|;. |
|000047d0| 69 66 28 21 73 74 72 63 | 6d 70 28 22 75 70 22 2c |if(!strc|mp("up",|
|000047e0| 20 20 20 2a 28 70 61 72 | 61 6d 73 2b 70 61 72 61 | *(par|ams+para|
|000047f0| 6d 5f 63 6f 75 6e 74 29 | 29 29 0a 20 20 20 20 20 |m_count)|)). |
|00004800| 20 20 20 74 6d 70 5f 68 | 75 6d 61 6e 5f 79 2d 2d | tmp_h|uman_y--|
|00004810| 3b 0a 20 20 20 20 20 20 | 69 66 28 21 73 74 72 63 |;. |if(!strc|
|00004820| 6d 70 28 22 64 6f 77 6e | 22 2c 20 2a 28 70 61 72 |mp("down|", *(par|
|00004830| 61 6d 73 2b 70 61 72 61 | 6d 5f 63 6f 75 6e 74 29 |ams+para|m_count)|
|00004840| 29 29 0a 20 20 20 20 20 | 20 20 20 74 6d 70 5f 68 |)). | tmp_h|
|00004850| 75 6d 61 6e 5f 79 2b 2b | 3b 0a 20 20 20 20 7d 0a |uman_y++|;. }.|
|00004860| 0a 20 20 6c 61 73 74 5f | 68 75 6d 61 6e 5f 78 20 |. last_|human_x |
|00004870| 3d 20 68 75 6d 61 6e 5f | 78 3b 0a 20 20 6c 61 73 |= human_|x;. las|
|00004880| 74 5f 68 75 6d 61 6e 5f | 79 20 3d 20 68 75 6d 61 |t_human_|y = huma|
|00004890| 6e 5f 79 3b 0a 0a 20 20 | 69 66 28 20 63 61 6e 5f |n_y;.. |if( can_|
|000048a0| 67 6f 28 74 6d 70 5f 68 | 75 6d 61 6e 5f 78 2c 74 |go(tmp_h|uman_x,t|
|000048b0| 6d 70 5f 68 75 6d 61 6e | 5f 79 29 20 29 20 7b 0a |mp_human|_y) ) {.|
|000048c0| 20 20 20 20 68 75 6d 61 | 6e 5f 78 20 3d 20 74 6d | huma|n_x = tm|
|000048d0| 70 5f 68 75 6d 61 6e 5f | 78 3b 0a 20 20 20 20 68 |p_human_|x;. h|
|000048e0| 75 6d 61 6e 5f 79 20 3d | 20 74 6d 70 5f 68 75 6d |uman_y =| tmp_hum|
|000048f0| 61 6e 5f 79 3b 0a 20 20 | 20 20 6e 75 6d 5f 77 61 |an_y;. | num_wa|
|00004900| 73 74 65 64 20 3d 20 63 | 68 61 73 65 28 29 3b 0a |sted = c|hase();.|
|00004910| 20 20 20 20 73 68 6f 77 | 5f 6d 6f 76 65 6d 65 6e | show|_movemen|
|00004920| 74 28 29 3b 0a 20 20 20 | 20 61 64 64 5f 73 63 6f |t();. | add_sco|
|00004930| 72 65 28 6e 75 6d 5f 77 | 61 73 74 65 64 29 3b 0a |re(num_w|asted);.|
|00004940| 20 20 20 20 69 66 28 21 | 6e 75 6d 5f 72 6f 62 6f | if(!|num_robo|
|00004950| 74 73 29 0a 20 20 20 20 | 20 20 6e 65 77 5f 6c 65 |ts). | new_le|
|00004960| 76 65 6c 28 29 3b 0a 20 | 20 20 20 65 6c 73 65 0a |vel();. | else.|
|00004970| 20 20 20 20 20 20 64 69 | 73 70 6c 61 79 5f 70 6f | di|splay_po|
|00004980| 73 73 69 62 6c 65 5f 6d | 6f 76 65 73 28 29 3b 0a |ssible_m|oves();.|
|00004990| 20 20 20 20 70 6f 69 6e | 74 65 72 5f 6d 6f 76 65 | poin|ter_move|
|000049a0| 64 28 28 57 69 64 67 65 | 74 29 30 2c 28 63 61 64 |d((Widge|t)0,(cad|
|000049b0| 64 72 5f 74 29 30 2c 65 | 76 65 6e 74 29 3b 0a 20 |dr_t)0,e|vent);. |
|000049c0| 20 7d 0a 0a 7d 0a 0a 0a | 0a 0a 2f 2a 41 52 47 53 | }..}...|../*ARGS|
|000049d0| 55 53 45 44 2a 2f 0a 73 | 74 61 74 69 63 20 58 74 |USED*/.s|tatic Xt|
|000049e0| 41 63 74 69 6f 6e 50 72 | 6f 63 0a 67 6f 5f 68 65 |ActionPr|oc.go_he|
|000049f0| 72 65 5f 61 63 74 69 6f | 6e 28 77 2c 65 76 65 6e |re_actio|n(w,even|
|00004a00| 74 2c 70 61 72 61 6d 73 | 2c 6e 75 6d 5f 70 61 72 |t,params|,num_par|
|00004a10| 61 6d 73 29 0a 20 20 57 | 69 64 67 65 74 20 77 3b |ams). W|idget w;|
|00004a20| 0a 20 20 58 42 75 74 74 | 6f 6e 45 76 65 6e 74 20 |. XButt|onEvent |
|00004a30| 2a 65 76 65 6e 74 3b 0a | 20 20 53 74 72 69 6e 67 |*event;.| String|
|00004a40| 20 2a 70 61 72 61 6d 73 | 3b 0a 20 20 43 61 72 64 | *params|;. Card|
|00004a50| 69 6e 61 6c 20 2a 6e 75 | 6d 5f 70 61 72 61 6d 73 |inal *nu|m_params|
|00004a60| 3b 0a 7b 0a 2f 2a 20 0a | 20 2a 20 54 68 69 73 20 |;.{./* .| * This |
|00004a70| 61 63 74 69 6f 6e 20 63 | 61 75 73 65 73 20 70 6c |action c|auses pl|
|00004a80| 61 79 65 72 27 73 20 69 | 63 6f 6e 20 74 6f 20 74 |ayer's i|con to t|
|00004a90| 72 79 20 74 6f 20 67 6f | 20 74 6f 20 61 20 73 70 |ry to go| to a sp|
|00004aa0| 6f 74 20 69 6e 20 74 68 | 65 20 0a 20 2a 20 70 6c |ot in th|e . * pl|
|00004ab0| 61 79 20 61 72 65 61 2e | 20 20 49 74 20 73 74 6f |ay area.| It sto|
|00004ac0| 70 73 20 69 66 20 61 20 | 6d 6f 76 65 20 63 61 6e |ps if a |move can|
|00004ad0| 6e 6f 74 20 62 65 20 6d | 61 64 65 2e 0a 20 2a 2f |not be m|ade.. */|
|00004ae0| 0a 20 20 69 6e 74 20 64 | 69 72 65 63 74 69 6f 6e |. int d|irection|
|00004af0| 3b 0a 20 20 69 6e 74 20 | 74 6d 70 5f 68 75 6d 61 |;. int |tmp_huma|
|00004b00| 6e 5f 78 2c 20 74 6d 70 | 5f 68 75 6d 61 6e 5f 79 |n_x, tmp|_human_y|
|00004b10| 3b 0a 20 20 69 6e 74 20 | 6e 75 6d 5f 77 61 73 74 |;. int |num_wast|
|00004b20| 65 64 3b 0a 0a 20 20 69 | 66 28 21 67 61 6d 65 5f |ed;.. i|f(!game_|
|00004b30| 61 63 74 69 76 65 29 20 | 72 65 74 75 72 6e 3b 0a |active) |return;.|
|00004b40| 0a 20 20 77 68 69 6c 65 | 28 64 69 72 65 63 74 69 |. while|(directi|
|00004b50| 6f 6e 20 3d 20 64 65 74 | 65 72 6d 69 6e 65 5f 64 |on = det|ermine_d|
|00004b60| 69 72 65 63 74 69 6f 6e | 28 65 76 65 6e 74 2d 3e |irection|(event->|
|00004b70| 78 2c 65 76 65 6e 74 2d | 3e 79 29 29 20 7b 0a 20 |x,event-|>y)) {. |
|00004b80| 20 20 20 69 66 28 64 69 | 72 65 63 74 69 6f 6e 20 | if(di|rection |
|00004b90| 3d 3d 20 53 54 49 4c 4c | 29 20 62 72 65 61 6b 3b |== STILL|) break;|
|00004ba0| 0a 20 20 20 20 74 6d 70 | 5f 68 75 6d 61 6e 5f 78 |. tmp|_human_x|
|00004bb0| 20 3d 20 68 75 6d 61 6e | 5f 78 3b 0a 20 20 20 20 | = human|_x;. |
|00004bc0| 74 6d 70 5f 68 75 6d 61 | 6e 5f 79 20 3d 20 68 75 |tmp_huma|n_y = hu|
|00004bd0| 6d 61 6e 5f 79 3b 0a 0a | 20 20 20 20 69 66 28 64 |man_y;..| if(d|
|00004be0| 69 72 65 63 74 69 6f 6e | 20 26 20 55 50 29 20 20 |irection| & UP) |
|00004bf0| 20 20 74 6d 70 5f 68 75 | 6d 61 6e 5f 79 2d 2d 3b | tmp_hu|man_y--;|
|00004c00| 0a 20 20 20 20 69 66 28 | 64 69 72 65 63 74 69 6f |. if(|directio|
|00004c10| 6e 20 26 20 44 4f 57 4e | 29 20 20 74 6d 70 5f 68 |n & DOWN|) tmp_h|
|00004c20| 75 6d 61 6e 5f 79 2b 2b | 3b 0a 20 20 20 20 69 66 |uman_y++|;. if|
|00004c30| 28 64 69 72 65 63 74 69 | 6f 6e 20 26 20 4c 45 46 |(directi|on & LEF|
|00004c40| 54 29 20 20 74 6d 70 5f | 68 75 6d 61 6e 5f 78 2d |T) tmp_|human_x-|
|00004c50| 2d 3b 0a 20 20 20 20 69 | 66 28 64 69 72 65 63 74 |-;. i|f(direct|
|00004c60| 69 6f 6e 20 26 20 52 49 | 47 48 54 29 20 74 6d 70 |ion & RI|GHT) tmp|
|00004c70| 5f 68 75 6d 61 6e 5f 78 | 2b 2b 3b 0a 0a 20 20 20 |_human_x|++;.. |
|00004c80| 20 69 66 28 20 21 63 61 | 6e 5f 67 6f 28 74 6d 70 | if( !ca|n_go(tmp|
|00004c90| 5f 68 75 6d 61 6e 5f 78 | 2c 74 6d 70 5f 68 75 6d |_human_x|,tmp_hum|
|00004ca0| 61 6e 5f 79 29 20 29 20 | 0a 20 20 20 20 20 20 62 |an_y) ) |. b|
|00004cb0| 72 65 61 6b 3b 0a 20 20 | 20 20 6c 61 73 74 5f 68 |reak;. | last_h|
|00004cc0| 75 6d 61 6e 5f 78 20 3d | 20 68 75 6d 61 6e 5f 78 |uman_x =| human_x|
|00004cd0| 3b 0a 20 20 20 20 6c 61 | 73 74 5f 68 75 6d 61 6e |;. la|st_human|
|00004ce0| 5f 79 20 3d 20 68 75 6d | 61 6e 5f 79 3b 0a 20 20 |_y = hum|an_y;. |
|00004cf0| 20 20 68 75 6d 61 6e 5f | 78 20 3d 20 74 6d 70 5f | human_|x = tmp_|
|00004d00| 68 75 6d 61 6e 5f 78 3b | 0a 20 20 20 20 68 75 6d |human_x;|. hum|
|00004d10| 61 6e 5f 79 20 3d 20 74 | 6d 70 5f 68 75 6d 61 6e |an_y = t|mp_human|
|00004d20| 5f 79 3b 0a 20 20 20 20 | 6e 75 6d 5f 77 61 73 74 |_y;. |num_wast|
|00004d30| 65 64 20 3d 20 63 68 61 | 73 65 28 29 3b 0a 20 20 |ed = cha|se();. |
|00004d40| 20 20 73 68 6f 77 5f 6d | 6f 76 65 6d 65 6e 74 28 | show_m|ovement(|
|00004d50| 29 3b 0a 20 20 20 20 61 | 64 64 5f 73 63 6f 72 65 |);. a|dd_score|
|00004d60| 28 6e 75 6d 5f 77 61 73 | 74 65 64 29 3b 0a 20 20 |(num_was|ted);. |
|00004d70| 20 20 69 66 28 21 6e 75 | 6d 5f 72 6f 62 6f 74 73 | if(!nu|m_robots|
|00004d80| 29 20 7b 0a 20 20 20 20 | 20 20 6e 65 77 5f 6c 65 |) {. | new_le|
|00004d90| 76 65 6c 28 29 3b 0a 20 | 20 20 20 20 20 62 72 65 |vel();. | bre|
|00004da0| 61 6b 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 69 66 |ak;. |}. if|
|00004db0| 28 73 70 69 66 66 79 29 | 20 7b 0a 20 20 20 20 20 |(spiffy)| {. |
|00004dc0| 20 64 69 73 70 6c 61 79 | 5f 70 6f 73 73 69 62 6c | display|_possibl|
|00004dd0| 65 5f 6d 6f 76 65 73 28 | 29 3b 0a 20 20 20 20 20 |e_moves(|);. |
|00004de0| 20 70 6f 69 6e 74 65 72 | 5f 6d 6f 76 65 64 28 28 | pointer|_moved((|
|00004df0| 57 69 64 67 65 74 29 30 | 2c 28 63 61 64 64 72 5f |Widget)0|,(caddr_|
|00004e00| 74 29 30 2c 65 76 65 6e | 74 29 3b 0a 20 20 20 20 |t)0,even|t);. |
|00004e10| 7d 0a 20 20 7d 0a 20 20 | 69 66 28 73 70 69 66 66 |}. }. |if(spiff|
|00004e20| 79 29 0a 20 20 20 20 64 | 69 73 70 6c 61 79 5f 70 |y). d|isplay_p|
|00004e30| 6f 73 73 69 62 6c 65 5f | 6d 6f 76 65 73 28 29 3b |ossible_|moves();|
|00004e40| 0a 20 20 70 6f 69 6e 74 | 65 72 5f 6d 6f 76 65 64 |. point|er_moved|
|00004e50| 28 28 57 69 64 67 65 74 | 29 30 2c 28 63 61 64 64 |((Widget|)0,(cadd|
|00004e60| 72 5f 74 29 30 2c 65 76 | 65 6e 74 29 3b 0a 7d 0a |r_t)0,ev|ent);.}.|
|00004e70| 0a 0a 0a 2f 2a 41 52 47 | 53 55 53 45 44 2a 2f 0a |.../*ARG|SUSED*/.|
|00004e80| 58 74 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 0a 70 |XtEventH|andler.p|
|00004e90| 6f 69 6e 74 65 72 5f 6d | 6f 76 65 64 28 77 2c 20 |ointer_m|oved(w, |
|00004ea0| 63 6c 6f 73 75 72 65 2c | 20 65 76 65 6e 74 29 0a |closure,| event).|
|00004eb0| 20 20 57 69 64 67 65 74 | 20 77 3b 0a 20 20 63 61 | Widget| w;. ca|
|00004ec0| 64 64 72 5f 74 20 63 6c | 6f 73 75 72 65 3b 0a 20 |ddr_t cl|osure;. |
|00004ed0| 20 58 50 6f 69 6e 74 65 | 72 4d 6f 76 65 64 45 76 | XPointe|rMovedEv|
|00004ee0| 65 6e 74 20 2a 65 76 65 | 6e 74 3b 0a 7b 0a 20 20 |ent *eve|nt;.{. |
|00004ef0| 69 66 28 67 61 6d 65 5f | 61 63 74 69 76 65 29 20 |if(game_|active) |
|00004f00| 0a 20 20 20 20 75 70 64 | 61 74 65 5f 70 6f 69 6e |. upd|ate_poin|
|00004f10| 74 65 72 28 20 64 65 74 | 65 72 6d 69 6e 65 5f 64 |ter( det|ermine_d|
|00004f20| 69 72 65 63 74 69 6f 6e | 28 65 76 65 6e 74 2d 3e |irection|(event->|
|00004f30| 78 2c 65 76 65 6e 74 2d | 3e 79 29 20 29 3b 0a 7d |x,event-|>y) );.}|
|00004f40| 0a 0a 2f 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |../*----|--------|
|00004f50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004f70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004f80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0a 2f 2a 2d |--------|--*/./*-|
|00004f90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004fa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004fb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004fc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004fd0| 2d 2d 2d 2d 2d 2a 2f 0a | 0a 73 74 61 74 69 63 20 |-----*/.|.static |
|00004fe0| 58 74 41 63 74 69 6f 6e | 73 52 65 63 20 61 63 74 |XtAction|sRec act|
|00004ff0| 69 6f 6e 73 5b 5d 20 3d | 20 7b 0a 20 20 7b 22 77 |ions[] =| {. {"w|
|00005000| 61 69 74 22 2c 20 20 20 | 20 20 20 28 58 74 41 63 |ait", | (XtAc|
|00005010| 74 69 6f 6e 50 72 6f 63 | 29 77 61 69 74 5f 61 63 |tionProc|)wait_ac|
|00005020| 74 69 6f 6e 7d 2c 0a 20 | 20 7b 22 74 65 6c 65 70 |tion},. | {"telep|
|00005030| 6f 72 74 22 2c 20 20 28 | 58 74 41 63 74 69 6f 6e |ort", (|XtAction|
|00005040| 50 72 6f 63 29 74 65 6c | 65 70 6f 72 74 5f 61 63 |Proc)tel|eport_ac|
|00005050| 74 69 6f 6e 7d 2c 0a 20 | 20 7b 22 73 6f 6e 69 63 |tion},. | {"sonic|
|00005060| 22 2c 20 20 20 20 20 28 | 58 74 41 63 74 69 6f 6e |", (|XtAction|
|00005070| 50 72 6f 63 29 73 6f 6e | 69 63 5f 61 63 74 69 6f |Proc)son|ic_actio|
|00005080| 6e 7d 2c 0a 20 20 7b 22 | 6d 6f 76 65 22 2c 20 20 |n},. {"|move", |
|00005090| 20 20 20 20 28 58 74 41 | 63 74 69 6f 6e 50 72 6f | (XtA|ctionPro|
|000050a0| 63 29 6d 6f 76 65 5f 61 | 63 74 69 6f 6e 7d 2c 0a |c)move_a|ction},.|
|000050b0| 20 20 7b 22 67 6f 5f 68 | 65 72 65 22 2c 20 20 20 | {"go_h|ere", |
|000050c0| 28 58 74 41 63 74 69 6f | 6e 50 72 6f 63 29 67 6f |(XtActio|nProc)go|
|000050d0| 5f 68 65 72 65 5f 61 63 | 74 69 6f 6e 7d 2c 0a 20 |_here_ac|tion},. |
|000050e0| 20 7b 22 71 75 69 74 22 | 2c 20 20 20 20 20 20 28 | {"quit"|, (|
|000050f0| 58 74 41 63 74 69 6f 6e | 50 72 6f 63 29 71 75 69 |XtAction|Proc)qui|
|00005100| 74 5f 61 63 74 69 6f 6e | 7d 2c 0a 20 20 7b 22 6e |t_action|},. {"n|
|00005110| 65 77 5f 67 61 6d 65 22 | 2c 20 20 28 58 74 41 63 |ew_game"|, (XtAc|
|00005120| 74 69 6f 6e 50 72 6f 63 | 29 6e 65 77 5f 67 61 6d |tionProc|)new_gam|
|00005130| 65 5f 61 63 74 69 6f 6e | 7d 2c 0a 20 20 7b 22 64 |e_action|},. {"d|
|00005140| 6f 5f 6e 6f 74 68 69 6e | 67 22 2c 28 58 74 41 63 |o_nothin|g",(XtAc|
|00005150| 74 69 6f 6e 50 72 6f 63 | 29 64 6f 5f 6e 6f 74 68 |tionProc|)do_noth|
|00005160| 69 6e 67 5f 61 63 74 69 | 6f 6e 7d 2c 0a 7d 3b 0a |ing_acti|on},.};.|
|00005170| 0a 76 6f 69 64 0a 69 6e | 69 74 5f 61 63 74 69 6f |.void.in|it_actio|
|00005180| 6e 73 28 29 0a 7b 0a 20 | 20 20 58 74 41 64 64 41 |ns().{. | XtAddA|
|00005190| 63 74 69 6f 6e 73 28 61 | 63 74 69 6f 6e 73 2c 58 |ctions(a|ctions,X|
|000051a0| 74 4e 75 6d 62 65 72 28 | 61 63 74 69 6f 6e 73 29 |tNumber(|actions)|
|000051b0| 29 3b 0a 7d 0a 0a 0a 53 | 48 41 52 5f 45 4f 46 0a |);.}...S|HAR_EOF.|
|000051c0| 69 66 20 74 65 73 74 20 | 37 37 34 32 20 2d 6e 65 |if test |7742 -ne|
|000051d0| 20 22 60 77 63 20 2d 63 | 20 3c 20 27 63 61 6c 6c | "`wc -c| < 'call|
|000051e0| 62 61 63 6b 73 2e 63 27 | 60 22 0a 74 68 65 6e 0a |backs.c'|`".then.|
|000051f0| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 65 72 72 6f |.echo sh|ar: erro|
|00005200| 72 20 74 72 61 6e 73 6d | 69 74 74 69 6e 67 20 22 |r transm|itting "|
|00005210| 27 63 61 6c 6c 62 61 63 | 6b 73 2e 63 27 22 20 27 |'callbac|ks.c'" '|
|00005220| 28 73 68 6f 75 6c 64 20 | 68 61 76 65 20 62 65 65 |(should |have bee|
|00005230| 6e 20 37 37 34 32 20 63 | 68 61 72 61 63 74 65 72 |n 7742 c|haracter|
|00005240| 73 29 27 0a 66 69 0a 66 | 69 20 23 20 65 6e 64 20 |s)'.fi.f|i # end |
|00005250| 6f 66 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 63 |of overw|riting c|
|00005260| 68 65 63 6b 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |heck.ech|o shar: |
|00005270| 65 78 74 72 61 63 74 69 | 6e 67 20 22 27 63 61 6c |extracti|ng "'cal|
|00005280| 6c 62 61 63 6b 73 2e 68 | 27 22 20 27 28 33 30 39 |lbacks.h|'" '(309|
|00005290| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|000052a0| 20 74 65 73 74 20 2d 66 | 20 27 63 61 6c 6c 62 61 | test -f| 'callba|
|000052b0| 63 6b 73 2e 68 27 0a 74 | 68 65 6e 0a 09 65 63 68 |cks.h'.t|hen..ech|
|000052c0| 6f 20 73 68 61 72 3a 20 | 77 69 6c 6c 20 6e 6f 74 |o shar: |will not|
|000052d0| 20 6f 76 65 72 2d 77 72 | 69 74 65 20 65 78 69 73 | over-wr|ite exis|
|000052e0| 74 69 6e 67 20 66 69 6c | 65 20 22 27 63 61 6c 6c |ting fil|e "'call|
|000052f0| 62 61 63 6b 73 2e 68 27 | 22 0a 65 6c 73 65 0a 63 |backs.h'|".else.c|
|00005300| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|00005310| 3e 20 27 63 61 6c 6c 62 | 61 63 6b 73 2e 68 27 0a |> 'callb|acks.h'.|
|00005320| 2f 2a 0a 20 2a 20 63 61 | 6c 6c 62 61 63 6b 73 2e |/*. * ca|llbacks.|
|00005330| 68 20 20 2d 2d 20 20 78 | 72 6f 62 6f 74 73 20 76 |h -- x|robots v|
|00005340| 31 2e 30 0a 20 2a 2f 0a | 0a 65 78 74 65 72 6e 20 |1.0. */.|.extern |
|00005350| 58 74 43 61 6c 6c 62 61 | 63 6b 50 72 6f 63 09 74 |XtCallba|ckProc.t|
|00005360| 65 6c 65 70 6f 72 74 5f | 63 61 6c 6c 62 61 63 6b |eleport_|callback|
|00005370| 28 29 2c 20 0a 09 09 09 | 77 61 69 74 5f 63 61 6c |(), ....|wait_cal|
|00005380| 6c 62 61 63 6b 28 29 2c | 20 0a 09 09 09 73 6f 6e |lback(),| ....son|
|00005390| 69 63 5f 63 61 6c 6c 62 | 61 63 6b 28 29 2c 20 0a |ic_callb|ack(), .|
|000053a0| 09 09 09 71 75 69 74 5f | 63 61 6c 6c 62 61 63 6b |...quit_|callback|
|000053b0| 28 29 2c 20 0a 09 09 09 | 6e 65 77 5f 67 61 6d 65 |(), ....|new_game|
|000053c0| 5f 63 61 6c 6c 62 61 63 | 6b 28 29 3b 0a 0a 65 78 |_callbac|k();..ex|
|000053d0| 74 65 72 6e 20 58 74 45 | 76 65 6e 74 48 61 6e 64 |tern XtE|ventHand|
|000053e0| 6c 65 72 20 09 70 6f 69 | 6e 74 65 72 5f 6d 6f 76 |ler .poi|nter_mov|
|000053f0| 65 64 28 29 3b 0a 0a 65 | 78 74 65 72 6e 20 76 6f |ed();..e|xtern vo|
|00005400| 69 64 20 09 09 72 65 73 | 65 74 5f 73 6f 6e 69 63 |id ..res|et_sonic|
|00005410| 5f 62 75 74 74 6f 6e 28 | 29 2c 0a 09 09 09 69 6e |_button(|),....in|
|00005420| 69 74 5f 61 63 74 69 6f | 6e 73 28 29 3b 0a 0a 65 |it_actio|ns();..e|
|00005430| 78 74 65 72 6e 20 69 6e | 74 20 20 09 09 64 65 74 |xtern in|t ..det|
|00005440| 65 72 6d 69 6e 65 5f 64 | 69 72 65 63 74 69 6f 6e |ermine_d|irection|
|00005450| 28 29 3b 0a 0a 53 48 41 | 52 5f 45 4f 46 0a 69 66 |();..SHA|R_EOF.if|
|00005460| 20 74 65 73 74 20 33 30 | 39 20 2d 6e 65 20 22 60 | test 30|9 -ne "`|
|00005470| 77 63 20 2d 63 20 3c 20 | 27 63 61 6c 6c 62 61 63 |wc -c < |'callbac|
|00005480| 6b 73 2e 68 27 60 22 0a | 74 68 65 6e 0a 09 65 63 |ks.h'`".|then..ec|
|00005490| 68 6f 20 73 68 61 72 3a | 20 65 72 72 6f 72 20 74 |ho shar:| error t|
|000054a0| 72 61 6e 73 6d 69 74 74 | 69 6e 67 20 22 27 63 61 |ransmitt|ing "'ca|
|000054b0| 6c 6c 62 61 63 6b 73 2e | 68 27 22 20 27 28 73 68 |llbacks.|h'" '(sh|
|000054c0| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 33 |ould hav|e been 3|
|000054d0| 30 39 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |09 chara|cters)'.|
|000054e0| 66 69 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |fi.fi # |end of o|
|000054f0| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|00005500| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|00005510| 61 63 74 69 6e 67 20 22 | 27 67 61 6d 65 2e 63 27 |acting "|'game.c'|
|00005520| 22 20 27 28 36 33 37 33 | 20 63 68 61 72 61 63 74 |" '(6373| charact|
|00005530| 65 72 73 29 27 0a 69 66 | 20 74 65 73 74 20 2d 66 |ers)'.if| test -f|
|00005540| 20 27 67 61 6d 65 2e 63 | 27 0a 74 68 65 6e 0a 09 | 'game.c|'.then..|
|00005550| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|00005560| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00005570| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 67 |xisting |file "'g|
|00005580| 61 6d 65 2e 63 27 22 0a | 65 6c 73 65 0a 63 61 74 |ame.c'".|else.cat|
|00005590| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|000055a0| 27 67 61 6d 65 2e 63 27 | 0a 2f 2a 0a 20 2a 20 67 |'game.c'|./*. * g|
|000055b0| 61 6d 65 2e 63 20 20 2d | 2d 20 20 78 72 6f 62 6f |ame.c -|- xrobo|
|000055c0| 74 73 20 76 31 2e 30 0a | 20 2a 0a 20 2a 20 4d 6f |ts v1.0.| *. * Mo|
|000055d0| 73 74 20 6f 66 20 74 68 | 65 20 67 61 6d 65 20 6c |st of th|e game l|
|000055e0| 6f 67 69 63 20 69 73 20 | 68 65 72 65 2e 20 20 0a |ogic is |here. .|
|000055f0| 20 2a 2f 0a 0a 23 69 6e | 63 6c 75 64 65 20 22 67 | */..#in|clude "g|
|00005600| 61 6d 65 2e 68 22 0a 23 | 69 6e 63 6c 75 64 65 20 |ame.h".#|include |
|00005610| 22 73 63 6f 72 65 2e 68 | 22 0a 0a 2f 2a 20 73 6f |"score.h|"../* so|
|00005620| 6d 65 20 6f 66 20 74 68 | 65 73 65 20 61 72 65 20 |me of th|ese are |
|00005630| 67 6c 6f 62 61 6c 20 2a | 2f 0a 69 6e 74 20 68 75 |global *|/.int hu|
|00005640| 6d 61 6e 5f 78 2c 20 68 | 75 6d 61 6e 5f 79 2c 20 |man_x, h|uman_y, |
|00005650| 6c 61 73 74 5f 68 75 6d | 61 6e 5f 78 2c 20 6c 61 |last_hum|an_x, la|
|00005660| 73 74 5f 68 75 6d 61 6e | 5f 79 3b 0a 0a 69 6e 74 |st_human|_y;..int|
|00005670| 20 72 6f 62 6f 74 5f 61 | 72 72 61 79 5b 4d 41 58 | robot_a|rray[MAX|
|00005680| 58 5d 5b 4d 41 58 59 5d | 2c 0a 20 20 20 20 72 6f |X][MAXY]|,. ro|
|00005690| 62 6f 74 5f 61 72 72 61 | 79 5f 62 61 6b 5b 4d 41 |bot_arra|y_bak[MA|
|000056a0| 58 58 5d 5b 4d 41 58 59 | 5d 3b 09 0a 09 2f 2a 20 |XX][MAXY|];.../* |
|000056b0| 54 68 65 73 65 20 61 72 | 72 61 79 73 20 61 72 65 |These ar|rays are|
|000056c0| 20 66 69 6c 6c 65 64 20 | 77 69 74 68 20 74 68 65 | filled |with the|
|000056d0| 20 72 6f 62 6f 74 73 20 | 61 6e 64 20 74 68 65 20 | robots |and the |
|000056e0| 68 65 61 70 73 20 0a 09 | 20 2a 20 54 68 65 79 20 |heaps ..| * They |
|000056f0| 64 6f 20 6e 6f 74 20 69 | 6e 63 6c 75 64 65 20 74 |do not i|nclude t|
|00005700| 68 65 20 70 6c 61 79 65 | 72 28 68 75 6d 61 6e 29 |he playe|r(human)|
|00005710| 2e 0a 09 20 2a 2f 0a 69 | 6e 74 20 73 63 6f 72 65 |... */.i|nt score|
|00005720| 3b 0a 69 6e 74 20 6e 75 | 6d 5f 72 6f 62 6f 74 73 |;.int nu|m_robots|
|00005730| 3b 0a 69 6e 74 20 6c 65 | 76 65 6c 3b 0a 69 6e 74 |;.int le|vel;.int|
|00005740| 20 67 61 6d 65 5f 61 63 | 74 69 76 65 3b 0a 69 6e | game_ac|tive;.in|
|00005750| 74 20 73 6f 6e 69 63 5f | 75 73 65 64 3b 0a 0a 2f |t sonic_|used;../|
|00005760| 2a 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |*-------|--------|
|00005770| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005780| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005790| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057a0| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0a 76 6f 69 64 0a 6e |-------*|/.void.n|
|000057b0| 65 77 5f 67 61 6d 65 28 | 29 0a 7b 0a 20 20 73 63 |ew_game(|).{. sc|
|000057c0| 6f 72 65 20 3d 20 30 3b | 0a 20 20 6c 65 76 65 6c |ore = 0;|. level|
|000057d0| 20 3d 20 30 3b 0a 20 20 | 73 6f 6e 69 63 5f 75 73 | = 0;. |sonic_us|
|000057e0| 65 64 20 3d 20 31 3b 0a | 20 20 67 61 6d 65 5f 61 |ed = 1;.| game_a|
|000057f0| 63 74 69 76 65 20 3d 20 | 31 3b 0a 20 20 6e 65 77 |ctive = |1;. new|
|00005800| 5f 6c 65 76 65 6c 28 29 | 3b 0a 20 20 75 70 64 61 |_level()|;. upda|
|00005810| 74 65 5f 73 63 6f 72 65 | 28 73 63 6f 72 65 29 3b |te_score|(score);|
|00005820| 0a 7d 0a 0a 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.}../*--|--------|
|00005830| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005840| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005850| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005860| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0a 76 |--------|----*/.v|
|00005870| 6f 69 64 0a 61 64 64 5f | 73 63 6f 72 65 28 6e 29 |oid.add_|score(n)|
|00005880| 0a 20 20 69 6e 74 20 6e | 3b 0a 7b 0a 20 20 73 63 |. int n|;.{. sc|
|00005890| 6f 72 65 20 2b 3d 20 31 | 30 20 2a 20 6e 3b 20 2f |ore += 1|0 * n; /|
|000058a0| 2a 20 74 65 6e 20 70 6f | 69 6e 74 73 20 66 6f 72 |* ten po|ints for|
|000058b0| 20 65 61 63 68 20 77 61 | 73 74 65 64 20 72 6f 62 | each wa|sted rob|
|000058c0| 6f 74 2e 20 2a 2f 0a 20 | 20 6e 75 6d 5f 72 6f 62 |ot. */. | num_rob|
|000058d0| 6f 74 73 20 2d 3d 20 6e | 3b 0a 20 20 69 66 28 6e |ots -= n|;. if(n|
|000058e0| 29 20 75 70 64 61 74 65 | 5f 73 63 6f 72 65 28 73 |) update|_score(s|
|000058f0| 63 6f 72 65 29 3b 0a 7d | 0a 0a 2f 2a 2d 2d 2d 2d |core);.}|../*----|
|00005900| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005910| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005920| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005930| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005940| 2d 2d 2a 2f 0a 76 6f 69 | 64 0a 6e 65 77 5f 6c 65 |--*/.voi|d.new_le|
|00005950| 76 65 6c 28 29 0a 7b 0a | 20 20 69 6e 74 20 78 2c |vel().{.| int x,|
|00005960| 79 2c 74 6d 70 3b 0a 0a | 20 20 72 65 73 65 74 5f |y,tmp;..| reset_|
|00005970| 73 6f 6e 69 63 5f 62 75 | 74 74 6f 6e 28 29 3b 0a |sonic_bu|tton();.|
|00005980| 20 20 69 66 28 21 73 6f | 6e 69 63 5f 75 73 65 64 | if(!so|nic_used|
|00005990| 29 20 7b 0a 20 20 20 20 | 73 63 6f 72 65 20 2b 3d |) {. |score +=|
|000059a0| 20 35 30 3b 20 09 2f 2a | 20 62 6f 6e 75 73 20 66 | 50; ./*| bonus f|
|000059b0| 6f 72 20 6e 6f 74 20 75 | 73 69 6e 67 20 73 6f 6e |or not u|sing son|
|000059c0| 69 63 20 73 63 72 65 77 | 64 72 69 76 65 72 20 6f |ic screw|driver o|
|000059d0| 6e 20 6c 61 73 74 20 6c | 65 76 65 6c 2a 2f 0a 20 |n last l|evel*/. |
|000059e0| 20 20 20 75 70 64 61 74 | 65 5f 73 63 6f 72 65 28 | updat|e_score(|
|000059f0| 73 63 6f 72 65 29 3b 0a | 20 20 7d 0a 20 20 73 6f |score);.| }. so|
|00005a00| 6e 69 63 5f 75 73 65 64 | 20 3d 20 30 3b 0a 20 20 |nic_used| = 0;. |
|00005a10| 6c 65 76 65 6c 2b 2b 3b | 0a 20 20 6e 75 6d 5f 72 |level++;|. num_r|
|00005a20| 6f 62 6f 74 73 20 3d 20 | 74 6d 70 20 3d 20 6c 65 |obots = |tmp = le|
|00005a30| 76 65 6c 2a 35 3b 0a 0a | 20 20 66 6f 72 5f 65 61 |vel*5;..| for_ea|
|00005a40| 63 68 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ch | |
|00005a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2a | | /*|
|00005a60| 20 63 6c 65 61 6e 20 6f | 75 74 20 62 6f 74 68 20 | clean o|ut both |
|00005a70| 74 68 65 20 72 6f 62 6f | 74 20 61 72 72 61 79 73 |the robo|t arrays|
|00005a80| 20 2a 2f 0a 20 20 7b 0a | 20 20 20 20 72 6f 62 6f | */. {.| robo|
|00005a90| 74 5f 61 72 72 61 79 5b | 78 5d 5b 79 5d 20 3d 20 |t_array[|x][y] = |
|00005aa0| 45 4d 50 54 59 3b 0a 20 | 20 20 20 72 6f 62 6f 74 |EMPTY;. | robot|
|00005ab0| 5f 61 72 72 61 79 5f 62 | 61 6b 5b 78 5d 5b 79 5d |_array_b|ak[x][y]|
|00005ac0| 20 3d 20 45 4d 50 54 59 | 3b 0a 20 20 7d 0a 20 20 | = EMPTY|;. }. |
|00005ad0| 0a 20 20 68 75 6d 61 6e | 5f 78 20 3d 20 28 69 6e |. human|_x = (in|
|00005ae0| 74 29 72 61 6e 64 6f 6d | 28 29 25 4d 41 58 58 3b |t)random|()%MAXX;|
|00005af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005b00| 20 20 2f 2a 20 61 73 73 | 69 67 6e 20 68 75 6d 61 | /* ass|ign huma|
|00005b10| 6e 20 74 6f 20 6e 65 77 | 20 73 70 61 63 65 20 2a |n to new| space *|
|00005b20| 2f 0a 20 20 68 75 6d 61 | 6e 5f 79 20 3d 20 28 69 |/. huma|n_y = (i|
|00005b30| 6e 74 29 72 61 6e 64 6f | 6d 28 29 25 4d 41 58 59 |nt)rando|m()%MAXY|
|00005b40| 3b 0a 20 20 72 6f 62 6f | 74 5f 61 72 72 61 79 5b |;. robo|t_array[|
|00005b50| 68 75 6d 61 6e 5f 78 5d | 5b 68 75 6d 61 6e 5f 79 |human_x]|[human_y|
|00005b60| 5d 20 3d 20 52 4f 42 4f | 54 3b 0a 0a 20 20 77 68 |] = ROBO|T;.. wh|
|00005b70| 69 6c 65 28 74 6d 70 2d | 2d 29 0a 20 20 7b 0a 20 |ile(tmp-|-). {. |
|00005b80| 20 20 20 78 20 3d 20 28 | 69 6e 74 29 72 61 6e 64 | x = (|int)rand|
|00005b90| 6f 6d 28 29 25 4d 41 58 | 58 3b 0a 20 20 20 20 79 |om()%MAX|X;. y|
|00005ba0| 20 3d 20 28 69 6e 74 29 | 72 61 6e 64 6f 6d 28 29 | = (int)|random()|
|00005bb0| 25 4d 41 58 59 3b 0a 20 | 20 20 20 69 66 28 72 6f |%MAXY;. | if(ro|
|00005bc0| 62 6f 74 5f 61 72 72 61 | 79 5b 78 5d 5b 79 5d 20 |bot_arra|y[x][y] |
|00005bd0| 3d 3d 20 52 4f 42 4f 54 | 29 20 74 6d 70 2b 2b 3b |== ROBOT|) tmp++;|
|00005be0| 20 20 20 20 20 20 20 20 | 2f 2a 20 73 70 61 63 65 | |/* space|
|00005bf0| 20 61 6c 72 65 61 64 79 | 20 6f 63 63 75 70 69 65 | already| occupie|
|00005c00| 64 20 2a 2f 0a 20 20 20 | 20 72 6f 62 6f 74 5f 61 |d */. | robot_a|
|00005c10| 72 72 61 79 5b 78 5d 5b | 79 5d 20 3d 20 52 4f 42 |rray[x][|y] = ROB|
|00005c20| 4f 54 3b 0a 20 20 7d 0a | 20 20 72 6f 62 6f 74 5f |OT;. }.| robot_|
|00005c30| 61 72 72 61 79 5b 68 75 | 6d 61 6e 5f 78 5d 5b 68 |array[hu|man_x][h|
|00005c40| 75 6d 61 6e 5f 79 5d 20 | 3d 20 45 4d 50 54 59 3b |uman_y] |= EMPTY;|
|00005c50| 0a 20 20 64 69 73 70 6c | 61 79 5f 6c 65 76 65 6c |. displ|ay_level|
|00005c60| 28 29 3b 0a 20 20 64 69 | 73 70 6c 61 79 5f 70 6f |();. di|splay_po|
|00005c70| 73 73 69 62 6c 65 5f 6d | 6f 76 65 73 28 29 3b 0a |ssible_m|oves();.|
|00005c80| 7d 0a 0a 2f 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}../*---|--------|
|00005c90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005ca0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005cb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005cc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0a 69 6e |--------|---*/.in|
|00005cd0| 74 0a 63 68 61 73 65 28 | 29 0a 7b 0a 20 20 2f 2a |t.chase(|).{. /*|
|00005ce0| 20 63 68 61 73 65 28 29 | 20 72 65 74 75 72 6e 73 | chase()| returns|
|00005cf0| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 72 | the num|ber of r|
|00005d00| 6f 62 6f 74 73 20 74 68 | 61 74 20 77 65 72 65 20 |obots th|at were |
|00005d10| 77 61 73 74 65 64 20 69 | 6e 20 65 61 63 68 20 63 |wasted i|n each c|
|00005d20| 61 6c 6c 2e 20 2a 2f 0a | 20 20 2f 2a 20 61 66 74 |all. */.| /* aft|
|00005d30| 65 72 20 65 61 63 68 20 | 63 61 6c 6c 2c 20 62 65 |er each |call, be|
|00005d40| 20 73 75 72 65 20 74 6f | 20 63 68 65 63 6b 20 69 | sure to| check i|
|00005d50| 66 20 61 6c 6c 20 74 68 | 65 20 72 6f 62 6f 74 73 |f all th|e robots|
|00005d60| 20 61 72 65 20 64 65 61 | 64 20 2a 2f 0a 20 20 69 | are dea|d */. i|
|00005d70| 6e 74 20 78 2c 79 3b 0a | 20 20 69 6e 74 20 6e 65 |nt x,y;.| int ne|
|00005d80| 77 78 2c 6e 65 77 79 3b | 0a 20 20 69 6e 74 20 6e |wx,newy;|. int n|
|00005d90| 75 6d 5f 77 61 73 74 65 | 64 20 3d 20 30 3b 0a 0a |um_waste|d = 0;..|
|00005da0| 20 20 66 6f 72 5f 65 61 | 63 68 0a 20 20 7b 0a 20 | for_ea|ch. {. |
|00005db0| 20 20 20 72 6f 62 6f 74 | 5f 61 72 72 61 79 5f 62 | robot|_array_b|
|00005dc0| 61 6b 5b 78 5d 5b 79 5d | 20 3d 20 72 6f 62 6f 74 |ak[x][y]| = robot|
|00005dd0| 5f 61 72 72 61 79 5b 78 | 5d 5b 79 5d 3b 0a 20 20 |_array[x|][y];. |
|00005de0| 20 20 69 66 28 72 6f 62 | 6f 74 5f 61 72 72 61 79 | if(rob|ot_array|
|00005df0| 5b 78 5d 5b 79 5d 20 21 | 3d 20 48 45 41 50 29 0a |[x][y] !|= HEAP).|
|00005e00| 20 20 20 20 20 20 72 6f | 62 6f 74 5f 61 72 72 61 | ro|bot_arra|
|00005e10| 79 5b 78 5d 5b 79 5d 20 | 3d 20 30 3b 0a 20 20 7d |y[x][y] |= 0;. }|
|00005e20| 0a 0a 20 20 66 6f 72 5f | 65 61 63 68 0a 20 20 7b |.. for_|each. {|
|00005e30| 0a 20 20 20 20 69 66 28 | 72 6f 62 6f 74 5f 61 72 |. if(|robot_ar|
|00005e40| 72 61 79 5f 62 61 6b 5b | 78 5d 5b 79 5d 20 21 3d |ray_bak[|x][y] !=|
|00005e50| 20 52 4f 42 4f 54 29 0a | 20 20 20 20 20 20 63 6f | ROBOT).| co|
|00005e60| 6e 74 69 6e 75 65 3b 0a | 0a 20 20 20 20 69 66 28 |ntinue;.|. if(|
|00005e70| 78 3e 68 75 6d 61 6e 5f | 78 29 20 20 20 20 20 20 |x>human_|x) |
|00005e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e90| 20 20 20 20 20 2f 2a 20 | 6d 6f 76 65 20 74 6f 77 | /* |move tow|
|00005ea0| 61 72 64 20 74 68 65 20 | 68 75 6d 61 6e 20 2a 2f |ard the |human */|
|00005eb0| 0a 20 20 20 20 20 20 6e | 65 77 78 20 3d 20 78 2d |. n|ewx = x-|
|00005ec0| 31 3b 0a 20 20 20 20 65 | 6c 73 65 20 20 0a 20 20 |1;. e|lse . |
|00005ed0| 20 20 20 20 69 66 28 78 | 3c 68 75 6d 61 6e 5f 78 | if(x|<human_x|
|00005ee0| 29 0a 20 20 20 20 20 20 | 20 20 6e 65 77 78 20 3d |). | newx =|
|00005ef0| 20 78 2b 31 3b 0a 20 20 | 20 20 20 20 65 6c 73 65 | x+1;. | else|
|00005f00| 0a 20 20 20 20 20 20 20 | 20 6e 65 77 78 20 3d 20 |. | newx = |
|00005f10| 78 3b 0a 0a 20 20 20 20 | 69 66 28 79 3e 68 75 6d |x;.. |if(y>hum|
|00005f20| 61 6e 5f 79 29 20 0a 20 | 20 20 20 20 20 6e 65 77 |an_y) . | new|
|00005f30| 79 20 3d 20 79 2d 31 3b | 0a 20 20 20 20 65 6c 73 |y = y-1;|. els|
|00005f40| 65 20 20 0a 20 20 20 20 | 20 20 69 66 28 79 3c 68 |e . | if(y<h|
|00005f50| 75 6d 61 6e 5f 79 29 0a | 20 20 20 20 20 20 20 20 |uman_y).| |
|00005f60| 6e 65 77 79 20 3d 20 79 | 2b 31 3b 0a 20 20 20 20 |newy = y|+1;. |
|00005f70| 20 20 65 6c 73 65 0a 20 | 20 20 20 20 20 20 20 6e | else. | n|
|00005f80| 65 77 79 20 3d 20 79 3b | 0a 0a 23 20 20 20 69 66 |ewy = y;|..# if|
|00005f90| 64 65 66 20 44 45 42 55 | 47 0a 20 20 20 20 70 72 |def DEBU|G. pr|
|00005fa0| 69 6e 74 66 28 22 6d 6f | 76 69 6e 67 20 28 25 64 |intf("mo|ving (%d|
|00005fb0| 2c 25 64 29 20 74 6f 20 | 28 25 64 2c 25 64 29 5c |,%d) to |(%d,%d)\|
|00005fc0| 6e 22 2c 78 2c 79 2c 6e | 65 77 78 2c 6e 65 77 79 |n",x,y,n|ewx,newy|
|00005fd0| 29 3b 0a 23 20 20 20 65 | 6e 64 69 66 0a 0a 20 20 |);.# e|ndif.. |
|00005fe0| 20 20 2f 2a 20 63 68 65 | 63 6b 20 74 6f 20 73 65 | /* che|ck to se|
|00005ff0| 65 20 69 66 20 61 20 72 | 6f 62 6f 74 20 6f 72 20 |e if a r|obot or |
|00006000| 68 65 61 70 20 77 61 73 | 20 61 6c 72 65 61 64 79 |heap was| already|
|00006010| 20 69 6e 20 74 68 61 74 | 20 73 70 6f 74 20 2a 2f | in that| spot */|
|00006020| 0a 20 20 20 20 69 66 28 | 72 6f 62 6f 74 5f 61 72 |. if(|robot_ar|
|00006030| 72 61 79 5b 6e 65 77 78 | 5d 5b 6e 65 77 79 5d 20 |ray[newx|][newy] |
|00006040| 3d 3d 20 52 4f 42 4f 54 | 29 0a 20 20 20 20 7b 0a |== ROBOT|). {.|
|00006050| 20 20 20 20 20 20 72 6f | 62 6f 74 5f 61 72 72 61 | ro|bot_arra|
|00006060| 79 5b 6e 65 77 78 5d 5b | 6e 65 77 79 5d 20 3d 20 |y[newx][|newy] = |
|00006070| 48 45 41 50 3b 0a 20 20 | 20 20 20 20 6e 75 6d 5f |HEAP;. | num_|
|00006080| 77 61 73 74 65 64 20 2b | 3d 20 32 3b 0a 20 20 20 |wasted +|= 2;. |
|00006090| 20 20 20 63 6f 6e 74 69 | 6e 75 65 3b 0a 20 20 20 | conti|nue;. |
|000060a0| 20 7d 0a 20 20 20 20 69 | 66 28 72 6f 62 6f 74 5f | }. i|f(robot_|
|000060b0| 61 72 72 61 79 5b 6e 65 | 77 78 5d 5b 6e 65 77 79 |array[ne|wx][newy|
|000060c0| 5d 20 3d 3d 20 48 45 41 | 50 29 0a 20 20 20 20 7b |] == HEA|P). {|
|000060d0| 0a 20 20 20 20 20 20 6e | 75 6d 5f 77 61 73 74 65 |. n|um_waste|
|000060e0| 64 2b 2b 3b 0a 20 20 20 | 20 20 20 63 6f 6e 74 69 |d++;. | conti|
|000060f0| 6e 75 65 3b 0a 20 20 20 | 20 7d 0a 20 20 20 20 2f |nue;. | }. /|
|00006100| 2a 20 6d 6f 76 65 20 72 | 6f 62 6f 74 20 74 6f 20 |* move r|obot to |
|00006110| 6e 65 77 20 6c 6f 63 61 | 74 69 6f 6e 20 2a 2f 0a |new loca|tion */.|
|00006120| 20 20 20 20 72 6f 62 6f | 74 5f 61 72 72 61 79 5b | robo|t_array[|
|00006130| 6e 65 77 78 5d 5b 6e 65 | 77 79 5d 20 3d 20 52 4f |newx][ne|wy] = RO|
|00006140| 42 4f 54 3b 0a 20 20 7d | 0a 20 20 72 65 74 75 72 |BOT;. }|. retur|
|00006150| 6e 28 6e 75 6d 5f 77 61 | 73 74 65 64 29 3b 0a 7d |n(num_wa|sted);.}|
|00006160| 0a 0a 2f 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |../*----|--------|
|00006170| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006180| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006190| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000061a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0a 76 6f 69 |--------|--*/.voi|
|000061b0| 64 0a 75 6e 64 6f 5f 63 | 68 61 73 65 28 29 0a 7b |d.undo_c|hase().{|
|000061c0| 0a 20 20 69 6e 74 20 78 | 2c 79 3b 0a 20 20 66 6f |. int x|,y;. fo|
|000061d0| 72 5f 65 61 63 68 0a 20 | 20 20 20 72 6f 62 6f 74 |r_each. | robot|
|000061e0| 5f 61 72 72 61 79 5b 78 | 5d 5b 79 5d 20 3d 20 72 |_array[x|][y] = r|
|000061f0| 6f 62 6f 74 5f 61 72 72 | 61 79 5f 62 61 6b 5b 78 |obot_arr|ay_bak[x|
|00006200| 5d 5b 79 5d 3b 0a 7d 0a | 0a 2f 2a 2d 2d 2d 2d 2d |][y];.}.|./*-----|
|00006210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006240| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006250| 2d 2a 2f 0a 76 6f 69 64 | 0a 74 65 6c 65 70 6f 72 |-*/.void|.telepor|
|00006260| 74 28 29 0a 7b 0a 20 20 | 69 6e 74 20 6e 75 6d 5f |t().{. |int num_|
|00006270| 77 61 73 74 65 64 3b 0a | 0a 20 20 69 66 28 21 67 |wasted;.|. if(!g|
|00006280| 61 6d 65 5f 61 63 74 69 | 76 65 29 20 72 65 74 75 |ame_acti|ve) retu|
|00006290| 72 6e 3b 0a 20 20 64 6f | 0a 20 20 7b 0a 20 20 20 |rn;. do|. {. |
|000062a0| 20 68 75 6d 61 6e 5f 78 | 20 3d 20 28 69 6e 74 29 | human_x| = (int)|
|000062b0| 72 61 6e 64 6f 6d 28 29 | 25 4d 41 58 58 3b 20 20 |random()|%MAXX; |
|000062c0| 20 20 20 20 20 20 2f 2a | 20 70 69 63 6b 20 61 20 | /*| pick a |
|000062d0| 73 70 6f 74 20 6e 6f 74 | 20 61 6c 72 65 61 64 79 |spot not| already|
|000062e0| 20 6f 63 63 75 70 69 65 | 64 20 2a 2f 0a 20 20 20 | occupie|d */. |
|000062f0| 20 68 75 6d 61 6e 5f 79 | 20 3d 20 28 69 6e 74 29 | human_y| = (int)|
|00006300| 72 61 6e 64 6f 6d 28 29 | 25 4d 41 58 59 3b 0a 20 |random()|%MAXY;. |
|00006310| 20 7d 0a 20 20 77 68 69 | 6c 65 28 72 6f 62 6f 74 | }. whi|le(robot|
|00006320| 5f 61 72 72 61 79 5b 68 | 75 6d 61 6e 5f 78 5d 5b |_array[h|uman_x][|
|00006330| 68 75 6d 61 6e 5f 79 5d | 20 21 3d 20 45 4d 50 54 |human_y]| != EMPT|
|00006340| 59 29 3b 0a 0a 20 20 73 | 68 6f 77 5f 74 65 6c 65 |Y);.. s|how_tele|
|00006350| 70 6f 72 74 28 29 3b 0a | 0a 20 20 6e 75 6d 5f 77 |port();.|. num_w|
|00006360| 61 73 74 65 64 20 3d 20 | 63 68 61 73 65 28 29 3b |asted = |chase();|
|00006370| 0a 0a 20 20 69 66 28 72 | 6f 62 6f 74 5f 61 72 72 |.. if(r|obot_arr|
|00006380| 61 79 5b 68 75 6d 61 6e | 5f 78 5d 5b 68 75 6d 61 |ay[human|_x][huma|
|00006390| 6e 5f 79 5d 20 21 3d 20 | 45 4d 50 54 59 29 0a 20 |n_y] != |EMPTY). |
|000063a0| 20 7b 0a 20 20 20 20 2f | 2a 20 64 65 61 74 68 2e | {. /|* death.|
|000063b0| 2e 2e 20 2a 2f 0a 20 20 | 20 20 75 6e 64 6f 5f 63 |.. */. | undo_c|
|000063c0| 68 61 73 65 28 29 3b 20 | 20 20 20 0a 20 20 20 20 |hase(); | . |
|000063d0| 2f 2a 20 69 74 20 69 73 | 20 61 20 6d 61 74 74 65 |/* it is| a matte|
|000063e0| 72 20 6f 66 20 70 72 65 | 66 65 72 65 6e 63 65 20 |r of pre|ference |
|000063f0| 74 6f 20 63 6c 65 61 72 | 20 74 68 65 20 73 63 72 |to clear| the scr|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.