home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!elroy.jpl.nasa.gov!ames!koriel!lll-winken.llnl.gov!fnnews.fnal.gov!fnnews!SNYDER
- From: SNYDER@d0sb10.fnal.gov
- Newsgroups: vmsnet.sources.games
- Subject: Mazewar for VMS (1/5) (repost)
- Date: 14 Jul 1993 06:01:59 GMT
- Organization: SUNY Stony Brook High Energy Physics
- Lines: 2669
- Message-ID: <SNYDER.93Jul14000200@d0sb10.fnal.gov>
- NNTP-Posting-Host: d0sb10.fnal.gov
- Xref: uunet vmsnet.sources.games:751
-
-
- Mazewar on VMS
-
- This is a port of the X11 mazewar game to VMS/Multinet.
- You can compile it with either gcc or VAX C. Look at descrip.mms,
- uncomment the appropriate lines, and run MMS. If you don't have
- MMS, it shouldn't be difficult to do by hand. See the man pages
- for playing instructions.
-
- Note that this kit does not include all of the original distribution; i've
- left out the sunview and X10 support files.
-
- scott snyder
- snyder@fnald0.fnal.gov
-
- $! ------------------ CUT HERE -----------------------
- $ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
- $!
- $! This archive created by VMS_SHARE Version 8.2
- $! On 10-JUL-1993 02:00:33.81 By user SNYDER
- $!
- $! The VMS_SHARE software that created this archive
- $! was written by Andy Harper, Kings College London UK
- $! -- December 1992
- $!
- $! Credit is due to these people for their original ideas:
- $! James Gray, Michael Bednarek
- $!
- $!+ THIS PACKAGE DISTRIBUTED IN 5 PARTS, TO KEEP EACH PART
- $! BELOW 200 BLOCKS
- $!
- $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
- $! AND EXECUTE AS A COMMAND PROCEDURE ( @name )
- $!
- $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
- $! 1. [.MAZEWAR]DESCRIP.MMS;3
- $! 2. [.MAZEWAR]DISPLAY.C;1
- $! 3. [.MAZEWAR]INIT.C;11
- $! 4. [.MAZEWAR]MAZEFIND.6;1
- $! 5. [.MAZEWAR]MAZEFIND.C;5
- $! 6. [.MAZEWAR]MAZEFIND.DOC;1
- $! 7. [.MAZEWAR]MAZEWAR.2;1
- $! 8. [.MAZEWAR]MAZEWAR.3;1
- $! 9. [.MAZEWAR]MAZEWAR.4;1
- $! 10. [.MAZEWAR]MAZEWAR.5;1
- $! 11. [.MAZEWAR]MAZEWAR.6;1
- $! 12. [.MAZEWAR]MAZEWAR.C;17
- $! 13. [.MAZEWAR]MAZEWAR.DOC;1
- $! 14. [.MAZEWAR]MAZEWAR.H;1
- $! 15. [.MAZEWAR]MAZEWAR.OPT;3
- $! 16. [.MAZEWAR]README.;1
- $! 17. [.MAZEWAR]VMS-README.;1
- $! 18. [.MAZEWAR]WINX11.C;23
- $! 19. [.MAZEWAR.BITMAPS]CUP.CUR;1
- $! 20. [.MAZEWAR.BITMAPS]DEADRAT.ICON;1
- $! 21. [.MAZEWAR.BITMAPS]DRAT.CUR;1
- $! 22. [.MAZEWAR.BITMAPS]DRATMASK.CUR;1
- $! 23. [.MAZEWAR.BITMAPS]ICON.IC;1
- $! 24. [.MAZEWAR.BITMAPS]MAZE.ICON;1
- $! 25. [.MAZEWAR.BITMAPS]RAT.CUR;1
- $! 26. [.MAZEWAR.BITMAPS]RATMASK.CUR;1
- $!
- $set="set"
- $set symbol/scope=(nolocal,noglobal)
- $f=f$parse("SHARE_UNPACK_TEMP","SYS$SCRATCH:."+f$getjpi("","PID"))
- $e="write sys$error ""%UNPACK"", "
- $w="write sys$output ""%UNPACK"", "
- $ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
- $ ve=f$getsyi("version")
- $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
- $ e "-E-OLDVER, Must run at least VMS 4.4"
- $ v=f$verify(v)
- $ exit 44
- $unpack: subroutine ! P1=filename, P2=checksum, P3=attributes
- $ if f$parse(P1) .nes. "" then $ goto dirok
- $ dn=f$parse(P1,,,"DIRECTORY")
- $ w "-I-CREDIR, Creating directory ''dn'"
- $ create/dir 'dn'
- $ if $status then $ goto dirok
- $ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
- $ delete 'f'*
- $ exit
- $dirok:
- $ x=f$search(P1)
- $ if x .eqs. "" then $ goto file_absent
- $ e "-W-EXISTS, File ''P1' exists. Skipped"
- $ delete 'f'*
- $ exit
- $file_absent:
- $ w "-I-UNPACK, Unpacking file ", P1
- $ n=P1
- $ if P3 .nes. "" then $ n=f
- $ if .not. f$verify() then $ define/user sys$output nl:
- $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='n'
- PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
- SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;
- PROCEDURE SkipPartsep LOOP EXITIF MARK(NONE)=END_OF(b);EXITIF INDEX(ERASE_LINE,
- "-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;PROCEDURE ProcessLine LOCAL c,s,l,b,
- n,p;c := ERASE_CHARACTER(1);s := ERASE_LINE;IF c = "X" THEN SPLIT_LINE; ENDIF;
- MOVE_HORIZONTAL(-1);l := LENGTH(s);p := 1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);
- p := p+1;CASE c FROM ' ' TO '`' ['`']: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[
- ' ']: p:=p+1;[INRANGE,OUTRANGE]: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;
- PROCEDURE Decode POSITION(BEGINNING_OF(b));LOOP EXITIF MARK(NONE)=END_OF(b);
- IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
- MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
- SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
- COMMAND_LINE,"file_name");b:=CREATE_BUFFER(f,f);Decode;WRITE_FILE(b,GET_INFO(
- COMMAND_LINE,"output_file"));QUIT;
- $ if p3 .eqs. "" then $ goto dl
- $ open/write fdl &f
- $ write fdl "RECORD"
- $ write fdl P3
- $ close fdl
- $ w "-I-CONVRFM, Converting record format to ", P3
- $ convert/fdl=&f &f-1 &P1
- $dl: delete 'f'*
- $ checksum 'P1'
- $ if checksum$checksum .nes. P2 then $ -
- e "-E-CHKSMFAIL, Checksum of ''P1' failed."
- $ exit
- $ endsubroutine
- $start:
- $!
- $ create 'f'
- XDEF`20=`20/define=("BROAD_ADDR=INADDR_BROADCAST","BSD_43")
- X
- X#`20uncomment`20the`20following`204`20lines`20to`20compile`20with`20gcc
- XCC`20=`20gcc
- XINC`20=`20/include=(multinet_root:`5Bmultinet.include.`5D)
- XCFLAGS`20=`20/debug/nocase_hack`20`20$(INC)`20$(DEF)`20$(CFLAGS)
- XLIBS`20=`20gnu_cc:`5B000000`5Dgcclib/l,
- X
- X#`20uncomment`20the`20following`206`20lines`20to`20compile`20with`20VAX`20C.
- X#INC`20=`20/include=(multinet_root:`5Bmultinet.include`5D)
- X#CFLAGS`20=`20$(INC)`20$(DEF)`20$(CFLAGS)
- X#.FIRST
- X#`09define`20sys`20multinet_root:`5Bmultinet.include.sys`5D
- X#`09define`20netinet`20multinet_root:`5Bmultinet.include.netinet`5D
- X#`09define`20vms`20multinet_root:`5Bmultinet.include.vms`5D
- X
- Xall`20:`20mazewar.exe`20mazefind.exe
- X`09!
- X
- XOBJS`20=`20display.obj`20init.obj`20mazewar.obj`20winx11.obj
- X
- Xmazewar.exe`20:`20$(OBJS)
- X`09link/exe=$*`20$+,`20$(LIBS)`20sys$disk:`5B`5Dmazewar.opt/opt
- X
- Xmazefind.exe`20:`20mazefind.obj
- X`09link/exe=$*`20$+,`20$(LIBS)`20sys$disk:`5B`5Dmazewar.opt/opt
- $ call unpack [.MAZEWAR]DESCRIP.MMS;3 -
- 358439636 "FORMAT STREAM_LF;CARRIAGE_CONTROL CARRIAGE_RETURN"
- $!
- $ create 'f'
- X/*`20$Header:`20display.c,v`201.7`2088/08/25`2009:57:54`20kent`20Exp`20$`20*/
- X
- X/*`20
- X`20*`20display.c`20-`20Display`20management`20routines`20for`20MazeWar
- X`20*`20
- X`20*`20Author:`09Christopher`20A.`20Kent
- X`20*`20`09`09Western`20Research`20Laboratory
- X`20*`09`09Digital`20Equipment`20Corporation
- X`20*`20Date:`09Wed`20Oct`20`201`201986
- X`20*/
- X
- X/***********************************************************
- XCopyright`201986`20by`20Digital`20Equipment`20Corporation,`20Maynard,`20Massac
- Vhusetts,
- X
- X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20All
- V`20Rights`20Reserved
- X
- XPermission`20to`20use,`20copy,`20modify,`20and`20distribute`20this`20software
- V`20and`20its`20
- Xdocumentation`20for`20any`20purpose`20and`20without`20fee`20is`20hereby`20gran
- Vted,`20
- Xprovided`20that`20the`20above`20copyright`20notice`20appear`20in`20all`20copie
- Vs`20and`20that
- Xboth`20that`20copyright`20notice`20and`20this`20permission`20notice`20appear
- V`20in`20
- Xsupporting`20documentation,`20and`20that`20the`20names`20of`20Digital`20not
- V`20be
- Xused`20in`20advertising`20or`20publicity`20pertaining`20to`20disstribution`20o
- Vf`20the
- Xsoftware`20without`20specific,`20written`20prior`20permission.`20`20
- X
- XDIGITAL`20DISCLAIMS`20ALL`20WARRANTIES`20WITH`20REGARD`20TO`20THIS`20SOFTWARE,
- V`20INCLUDING
- XALL`20IMPLIED`20WARRANTIES`20OF`20MERCHANTABILITY`20AND`20FITNESS,`20IN`20NO
- V`20EVENT`20SHALL
- XDIGITAL`20BE`20LIABLE`20FOR`20ANY`20SPECIAL,`20INDIRECT`20OR`20CONSEQUENTIAL
- V`20DAMAGES`20OR
- XANY`20DAMAGES`20WHATSOEVER`20RESULTING`20FROM`20LOSS`20OF`20USE,`20DATA`20OR
- V`20PROFITS,
- XWHETHER`20IN`20AN`20ACTION`20OF`20CONTRACT,`20NEGLIGENCE`20OR`20OTHER`20TORTIO
- VUS`20ACTION,
- XARISING`20OUT`20OF`20OR`20IN`20CONNECTION`20WITH`20THE`20USE`20OR`20PERFORMANC
- VE`20OF`20THIS
- XSOFTWARE.
- X
- X******************************************************************/
- X
- X/*
- X`20*`20$Log:`09display.c,v`20$
- X`20*`20Revision`201.7`20`2088/08/25`20`2009:57:54`20`20kent
- X`20*`20More`20bitmap`20portability`20hacks.
- X`20*`20
- X`20*`20Revision`201.6`20`2087/03/31`20`2014:41:43`20`20kent
- X`20*`20Portability`20considerations,`20especially`20byteswapping`20to/from`20t
- Vhe`20net.
- X`20*`20
- X`20*`20Revision`201.5`20`2086/12/04`20`2017:43:39`20`20kent
- X`20*`20A`20little`20efficiency`20in`20DisplayOthersPosition().
- X`20*`20
- X`20*`20Revision`201.3`20`2086/12/03`20`2013:29:52`20`20kent
- X`20*`20Lint`20pass.`20
- X`20*`20
- X`20*`20Revision`201.2`20`2086/12/01`20`2023:45:36`20`20kent
- X`20*`20Housecleaning`20and`20documentation`20pass.
- X`20*`20
- X`20*`20
- X`20*`20Revision`201.1`20`2086/11/26`20`2016:56:12`20`20kent
- X`20*`20Initial`20revision
- X`20*`20
- X`20*/
- X
- X#ifndef`09lint
- Xstatic`20char`20rcs_ident`5B`5D`20=`20"$Header:`20display.c,v`201.7`2088/08/25
- V`2009:57:54`20kent`20Exp`20$";
- X#endif
- X
- X#include`20<sys/types.h>
- X#include`20<sys/socket.h>
- X#include`20<sys/time.h>
- X
- X#include`20<netinet/in.h>
- X
- X#include`20<stdio.h>
- X
- X#include`20"mazewar.h"
- X
- X/*`20
- X`20*`20Manage`20the`20display.`20This`20routine`20handles`20the`20three`20area
- Vs`20of`20the
- X`20*`20screen:`20the`20perspective`20view,`20the`20maze`20overview,`20and`20th
- Ve`20scores.
- X`20*`20
- X`20*`20The`20coordinate`20system`20of`20the`20display`20is`20a`20x-reflected
- V`201st`20quadrant:
- X`20*`20(0,0)`20upper`20left,`20x`20increases`20to`20the`20right,`20y`20increas
- Ves`20down.`20Just
- X`20*`20like`20most`20CRT`20coordinate`20systems.`20North`20is`20to`20the`20rig
- Vht,`20for`20no
- X`20*`20particular`20reason.`20Cells`20in`20the`20maze`20are`2016x16.
- X`20*/
- X
- Xtypedef`09struct`20`7B
- X`09Boolean`09`09playing;
- X`09int`09`09x,`20y;
- X`09Direction`09dir;
- X`7D`20RatState;
- X
- Xstatic`20RatState`09clearArray`5BMAXRATS`5D;
- X
- Xstatic
- XBitCell`09normalArrows`5BNDIRECTION`5D`20=`20`7B
- X`20`20`20`20`20`20`7B`090,`090200,`090300,`090340,`09/*`20right`20*/
- X`090360,`090370,`090177774,01777776,
- X`090177777,0177776,0177774,0370,
- X`090360,`090340,`090300,`090200`09`7D,
- X`20`20`20`20`20`20`7B`090400,`0901400,`0903400,`0907400,`09/*`20left`20*/
- X`09017400,`09037777,`09077777,`090177777,
- X`09077777,`09037777,`09017400,`0907400,
- X`0903400,`0901400,`090400,`090`09`7D,
- X`20`20`20`20`20`20`7B`0901740,`0901740,`0901740,`0901740,`09/*`20down`20*/
- X`0901740,`0901740,`0901740,`0901740,
- X`09077777,`09037776,`09017774,`0907770,
- X`0903760,`0901740,`090700,`090200`09`7D,
- X`20`20`20`20`20`20`7B`200200,`090700,`0901740,`0903760,`09/*`20up`20*/
- X`0907770,`09017774,`09037776,`09077777,
- X`0901740,`0901740,`0901740,`0901740,
- X`0901740,`0901740,`0901740,`0901740`09`7D
- X`7D;
- X
- Xstatic
- XBitCell`09invincibleArrows`5BNDIRECTION`5D`20=`20`7B
- X`20`20`20`20`20`20`7B`090,`090600,`090300,`090340,`09/*`20right`20*/
- X`090160,`090210,`090177464,0177102,
- X`090177043,0177022,0177544,0210,
- X`090160,`090340,`090300,`090600`09`7D,
- X`20`20`20`20`20`20`7B`090700,`0901400,`0903400,`0907000,`09/*`20left`20*/
- X`09010400,`09023377,`09044177,`090142177,
- X`09041177,`09026377,`09010400,`0907000,
- X`0903400,`0901400,`090700,`090`09`7D,
- X`20`20`20`20`20`20`7B`0901740,`0901740,`0901740,`0901740,`09/*`20down`20*/
- X`0901740,`0901740,`0901740,`09041041,
- X`09072327,`09034416,`09012414,`0904110,
- X`0902620,`0901040,`090700,`090200`09`7D,
- X`20`20`20`20`20`20`7B`090200,`090700,`0901040,`0902320,`09/*`20up`20*/
- X`0904410,`09014214,`09034116,`09072627,
- X`09041041,`0901740,`0901740,`0901740,
- X`0901740,`0901740,`0901740,`0901740`09`7D
- X`7D;
- X
- Xstatic
- XBitCell`09otherArrows`5BNDIRECTION`5D`20=`20`7B
- X`20`20`20`20`20`20`7B`090,`090200,`090300,`090340,`09/*`20right`20*/
- X`090177660,0100030,0100014,0100006,
- X`090100003,0100006,0100014,0100030,
- X`090177660,0340,`090300,`090200`09`7D,
- X`20`20`20`20`20`20`7B`090,`090400,`0901400,`0903400,`09/*`20left`20*/
- X`0906777,`09014001,`09030001,`09060001,
- X`090140001,060001,`09030001,`09014001,
- X`0906777,`0903400,`0901400,`090400`09`7D,
- X`20`20`20`20`20`20`7B`0907770,`0904010,`0904010,`0904010,`09/*`20down`20*/
- X`0904010,`0904010,`0904010,`0904010,
- X`09074017,`09034016,`09014014,`0906030,
- X`0903060,`0901540,`090700,`090200`09`7D,
- X`20`20`20`20`20`20`7B`090200,`090700,`0901540,`0903060,`09/*`20up`20*/
- X`0906030,`09014014,`09030006,`09074017,`09/*`20074014`20in`20original`20*/
- X`0904010,`0904010,`0904010,`0904010,
- X`0904010,`0904010,`0904010,`0907770`09`7D
- X`7D;
- X
- Xstatic
- XBitCell`09numbers`5BMAXRATS`5D`20=`20`7B
- X`20`20`20`20`20`20`7B`090,`090,`090,`090,`09/*`200`20*/
- X`090,`090,`090300,`090440,
- X`090440,`090440,`090300,`090,
- X`090,`090,`090,`090`09`7D,
- X`20`20`20`20`20`20`7B`090,`090,`090,`090,`09/*`201`20*/
- X`090,`090,`090600,`090200,
- X`090200,`090200,`090700,`090,
- X`090,`090,`090,`090`09`7D,
- X`20`20`20`20`20`20`7B`090,`090,`090,`090,`09/*`202`20*/
- X`090,`090,`090600,`0901100,
- X`090200,`090400,`0901700,`090,
- X`090,`090,`090,`090`09`7D,
- X`20`20`20`20`20`20`7B`090,`090,`090,`090,`09/*`203`20*/
- X`090,`090,`0901600,`090100,
- X`090600,`090100,`0901600,`090,
- X`090,`090,`090,`090`09`7D,
- X`20`20`20`20`20`20`7B`090,`090,`090,`090,`09/*`204`20*/
- X`090,`090,`0901100,`0901100,
- X`0901740,`090100,`090100,`090,
- X`090,`090,`090,`090`09`7D,
- X`20`20`20`20`20`20`7B`090,`090,`090,`090,`09/*`205`20*/
- X`090,`090,`0901700,`0901000,
- X`0901700,`090100,`0901700,`090,
- X`090,`090,`090,`090`09`7D,
- X`20`20`20`20`20`20`7B`090,`090,`090,`090,`09/*`206`20*/
- X`090,`090,`0901700,`0901000,
- X`0901700,`0901100,`0901700,`090,
- X`090,`090,`090,`090`09`7D,
- X`20`20`20`20`20`20`7B`090,`090,`090,`090,`09/*`207`20*/
- X`090,`090,`0901700,`090100,
- X`090200,`090400,`0901000,`090,
- X`090,`090,`090,`090`09`7D
- X`7D;
- X
- Xstatic`20XYpair`09viewTable`5B`5D`20=`20`7B
- X`09`7B`7B`2067,`09333`20`7D,`09`7B`2067,`0967`20`7D`7D,`09`7B`7B`2067,`09333
- V`20`7D,`09`7B`20333,`09333`20`7D`7D,
- X`09`7B`7B`2067,`0967`20`7D,`09`7B`20333,`0967`20`7D`7D,`09`7B`7B`200,`09400
- V`20`7D,`09`7B`2067,`09333`20`7D`7D,
- X`09`7B`7B`200,`090`20`7D,`09`7B`2067,`0967`20`7D`7D,`09`7B`7B`200,`09333`20
- V`7D,`09`7B`2067,`09333`20`7D`7D,
- X`09`7B`7B`200,`0967`20`7D,`09`7B`2067,`0967`20`7D`7D,`09`7B`7B`20333,`09333
- V`20`7D,`09`7B`20333,`0967`20`7D`7D,
- X`09`7B`7B`20333,`09333`20`7D,`09`7B`20400,`09333`20`7D`7D,`09`7B`7B`20333,`096
- V7`20`7D,`09`7B`20400,`0967`20`7D`7D,
- X`09`7B`7B`20333,`09333`20`7D,`09`7B`20400,`09400`20`7D`7D,`09`7B`7B`20333,`096
- V7`20`7D,`09`7B`20400,`090`20`7D`7D,
- X`09`7B`7B`20120,`09280`20`7D,`09`7B`20120,`09120`20`7D`7D,`09`7B`7B`20120,`092
- V80`20`7D,`09`7B`20280,`09280`20`7D`7D,
- X`09`7B`7B`20120,`09120`20`7D,`09`7B`20280,`09120`20`7D`7D,`09`7B`7B`2067,`0933
- V3`20`7D,`09`7B`20120,`09280`20`7D`7D,
- X`09`7B`7B`2067,`0967`20`7D,`09`7B`20120,`09120`20`7D`7D,`09`7B`7B`2067,`09280
- V`20`7D,`09`7B`20120,`09280`20`7D`7D,
- X`09`7B`7B`2067,`09120`20`7D,`09`7B`20120,`09120`20`7D`7D,`09`7B`7B`20280,`0928
- V0`20`7D,`09`7B`20280,`09120`20`7D`7D,
- X`09`7B`7B`20280,`09280`20`7D,`09`7B`20333,`09280`20`7D`7D,`09`7B`7B`20280,`091
- V20`20`7D,`09`7B`20333,`09120`20`7D`7D,
- X`09`7B`7B`20280,`09280`20`7D,`09`7B`20333,`09333`20`7D`7D,`09`7B`7B`20280,`091
- V20`20`7D,`09`7B`20333,`0967`20`7D`7D,
- X`09`7B`7B`20143,`09257`20`7D,`09`7B`20143,`09143`20`7D`7D,`09`7B`7B`20143,`092
- V57`20`7D,`09`7B`20257,`09257`20`7D`7D,
- X`09`7B`7B`20143,`09143`20`7D,`09`7B`20257,`09143`20`7D`7D,`09`7B`7B`20120,`092
- V80`20`7D,`09`7B`20143,`09257`20`7D`7D,
- X`09`7B`7B`20120,`09120`20`7D,`09`7B`20143,`09143`20`7D`7D,`09`7B`7B`20120,`092
- V57`20`7D,`09`7B`20143,`09257`20`7D`7D,
- X`09`7B`7B`20120,`09143`20`7D,`09`7B`20143,`09143`20`7D`7D,`09`7B`7B`20257,`092
- V57`20`7D,`09`7B`20257,`09143`20`7D`7D,
- X`09`7B`7B`20257,`09257`20`7D,`09`7B`20280,`09257`20`7D`7D,`09`7B`7B`20257,`091
- V43`20`7D,`09`7B`20280,`09143`20`7D`7D,
- X`09`7B`7B`20257,`09257`20`7D,`09`7B`20280,`09280`20`7D`7D,`09`7B`7B`20257,`091
- V43`20`7D,`09`7B`20280,`09120`20`7D`7D,
- X`09`7B`7B`20156,`09244`20`7D,`09`7B`20156,`09156`20`7D`7D,`09`7B`7B`20156,`092
- V44`20`7D,`09`7B`20244,`09244`20`7D`7D,
- X`09`7B`7B`20156,`09156`20`7D,`09`7B`20244,`09156`20`7D`7D,`09`7B`7B`20143,`092
- V57`20`7D,`09`7B`20156,`09244`20`7D`7D,
- X`09`7B`7B`20143,`09143`20`7D,`09`7B`20156,`09156`20`7D`7D,`09`7B`7B`20143,`092
- V44`20`7D,`09`7B`20156,`09244`20`7D`7D,
- X`09`7B`7B`20143,`09156`20`7D,`09`7B`20156,`09156`20`7D`7D,`09`7B`7B`20244,`092
- V44`20`7D,`09`7B`20244,`09156`20`7D`7D,
- X`09`7B`7B`20244,`09244`20`7D,`09`7B`20257,`09244`20`7D`7D,`09`7B`7B`20244,`091
- V56`20`7D,`09`7B`20257,`09156`20`7D`7D,
- X`09`7B`7B`20244,`09244`20`7D,`09`7B`20257,`09257`20`7D`7D,`09`7B`7B`20244,`091
- V56`20`7D,`09`7B`20257,`09143`20`7D`7D,
- X`09`7B`7B`20164,`09236`20`7D,`09`7B`20164,`09164`20`7D`7D,`09`7B`7B`20164,`092
- V36`20`7D,`09`7B`20236,`09236`20`7D`7D,
- X`09`7B`7B`20164,`09164`20`7D,`09`7B`20236,`09164`20`7D`7D,`09`7B`7B`20156,`092
- V44`20`7D,`09`7B`20164,`09236`20`7D`7D,
- X`09`7B`7B`20156,`09156`20`7D,`09`7B`20164,`09164`20`7D`7D,`09`7B`7B`20156,`092
- V36`20`7D,`09`7B`20164,`09236`20`7D`7D,
- X`09`7B`7B`20156,`09164`20`7D,`09`7B`20164,`09164`20`7D`7D,`09`7B`7B`20236,`092
- V36`20`7D,`09`7B`20236,`09164`20`7D`7D,
- X`09`7B`7B`20236,`09236`20`7D,`09`7B`20244,`09236`20`7D`7D,`09`7B`7B`20236,`091
- V64`20`7D,`09`7B`20244,`09164`20`7D`7D,
- X`09`7B`7B`20236,`09236`20`7D,`09`7B`20244,`09244`20`7D`7D,`09`7B`7B`20236,`091
- V64`20`7D,`09`7B`20244,`09156`20`7D`7D,
- X`09`7B`7B`20170,`09230`20`7D,`09`7B`20170,`09170`20`7D`7D,`09`7B`7B`20170,`092
- V30`20`7D,`09`7B`20230,`09230`20`7D`7D,
- X`09`7B`7B`20170,`09170`20`7D,`09`7B`20230,`09170`20`7D`7D,`09`7B`7B`20164,`092
- V36`20`7D,`09`7B`20170,`09230`20`7D`7D,
- X`09`7B`7B`20164,`09164`20`7D,`09`7B`20170,`09170`20`7D`7D,`09`7B`7B`20164,`092
- V30`20`7D,`09`7B`20170,`09230`20`7D`7D,
- X`09`7B`7B`20164,`09170`20`7D,`09`7B`20170,`09170`20`7D`7D,`09`7B`7B`20230,`092
- V30`20`7D,`09`7B`20230,`09170`20`7D`7D,
- X`09`7B`7B`20230,`09230`20`7D,`09`7B`20236,`09230`20`7D`7D,`09`7B`7B`20230,`091
- V70`20`7D,`09`7B`20236,`09170`20`7D`7D,
- X`09`7B`7B`20230,`09230`20`7D,`09`7B`20236,`09236`20`7D`7D,`09`7B`7B`20230,`091
- V70`20`7D,`09`7B`20236,`09164`20`7D`7D,
- X`09`7B`7B`20174,`09226`20`7D,`09`7B`20174,`09174`20`7D`7D,`09`7B`7B`20174,`092
- V26`20`7D,`09`7B`20226,`09226`20`7D`7D,
- X`09`7B`7B`20174,`09174`20`7D,`09`7B`20226,`09174`20`7D`7D,`09`7B`7B`20170,`092
- V30`20`7D,`09`7B`20174,`09226`20`7D`7D,
- X`09`7B`7B`20170,`09170`20`7D,`09`7B`20174,`09174`20`7D`7D,`09`7B`7B`20170,`092
- V26`20`7D,`09`7B`20174,`09226`20`7D`7D,
- X`09`7B`7B`20170,`09174`20`7D,`09`7B`20174,`09174`20`7D`7D,`09`7B`7B`20226,`092
- V26`20`7D,`09`7B`20226,`09174`20`7D`7D,
- X`09`7B`7B`20226,`09226`20`7D,`09`7B`20230,`09226`20`7D`7D,`09`7B`7B`20226,`091
- V74`20`7D,`09`7B`20230,`09174`20`7D`7D,
- X`09`7B`7B`20226,`09226`20`7D,`09`7B`20230,`09230`20`7D`7D,`09`7B`7B`20226,`091
- V74`20`7D,`09`7B`20230,`09170`20`7D`7D,
- X`09`7B`7B`20177,`09223`20`7D,`09`7B`20177,`09177`20`7D`7D,`09`7B`7B`20177,`092
- V23`20`7D,`09`7B`20223,`09223`20`7D`7D,
- X`09`7B`7B`20177,`09177`20`7D,`09`7B`20223,`09177`20`7D`7D,`09`7B`7B`20174,`092
- V26`20`7D,`09`7B`20177,`09223`20`7D`7D,
- X`09`7B`7B`20174,`09174`20`7D,`09`7B`20177,`09177`20`7D`7D,`09`7B`7B`20174,`092
- V23`20`7D,`09`7B`20177,`09223`20`7D`7D,
- X`09`7B`7B`20174,`09177`20`7D,`09`7B`20177,`09177`20`7D`7D,`09`7B`7B`20223,`092
- V23`20`7D,`09`7B`20223,`09177`20`7D`7D,
- X`09`7B`7B`20223,`09223`20`7D,`09`7B`20226,`09223`20`7D`7D,`09`7B`7B`20223,`091
- V77`20`7D,`09`7B`20226,`09177`20`7D`7D,
- X`09`7B`7B`20223,`09223`20`7D,`09`7B`20226,`09226`20`7D`7D,`09`7B`7B`20223,`091
- V77`20`7D,`09`7B`20226,`09174`20`7D`7D,
- X`09`7B`7B`20179,`09221`20`7D,`09`7B`20179,`09179`20`7D`7D,`09`7B`7B`20179,`092
- V21`20`7D,`09`7B`20221,`09221`20`7D`7D,
- X`09`7B`7B`20179,`09179`20`7D,`09`7B`20221,`09179`20`7D`7D,`09`7B`7B`20177,`092
- V23`20`7D,`09`7B`20179,`09221`20`7D`7D,
- X`09`7B`7B`20177,`09177`20`7D,`09`7B`20179,`09179`20`7D`7D,`09`7B`7B`20177,`092
- V21`20`7D,`09`7B`20179,`09221`20`7D`7D,
- X`09`7B`7B`20177,`09179`20`7D,`09`7B`20179,`09179`20`7D`7D,`09`7B`7B`20221,`092
- V21`20`7D,`09`7B`20221,`09179`20`7D`7D,
- X`09`7B`7B`20221,`09221`20`7D,`09`7B`20223,`09221`20`7D`7D,`09`7B`7B`20221,`091
- V79`20`7D,`09`7B`20223,`09179`20`7D`7D,
- X`09`7B`7B`20221,`09221`20`7D,`09`7B`20223,`09223`20`7D`7D,`09`7B`7B`20221,`091
- V79`20`7D,`09`7B`20223,`09177`20`7D`7D,
- X`09`7B`7B`20181,`09219`20`7D,`09`7B`20181,`09181`20`7D`7D,`09`7B`7B`20181,`092
- V19`20`7D,`09`7B`20219,`09219`20`7D`7D,
- X`09`7B`7B`20181,`09181`20`7D,`09`7B`20219,`09181`20`7D`7D,`09`7B`7B`20179,`092
- V21`20`7D,`09`7B`20181,`09219`20`7D`7D,
- X`09`7B`7B`20179,`09179`20`7D,`09`7B`20181,`09181`20`7D`7D,`09`7B`7B`20179,`092
- V19`20`7D,`09`7B`20181,`09219`20`7D`7D,
- X`09`7B`7B`20179,`09181`20`7D,`09`7B`20181,`09181`20`7D`7D,`09`7B`7B`20219,`092
- V19`20`7D,`09`7B`20219,`09181`20`7D`7D,
- X`09`7B`7B`20219,`09219`20`7D,`09`7B`20221,`09219`20`7D`7D,`09`7B`7B`20219,`091
- V81`20`7D,`09`7B`20221,`09181`20`7D`7D,
- X`09`7B`7B`20219,`09219`20`7D,`09`7B`20221,`09221`20`7D`7D,`09`7B`7B`20219,`091
- V81`20`7D,`09`7B`20221,`09179`20`7D`7D,
- X`09`7B`7B`20183,`09217`20`7D,`09`7B`20183,`09183`20`7D`7D,`09`7B`7B`20183,`092
- V17`20`7D,`09`7B`20217,`09217`20`7D`7D,
- X`09`7B`7B`20183,`09183`20`7D,`09`7B`20217,`09183`20`7D`7D,`09`7B`7B`20181,`092
- V19`20`7D,`09`7B`20183,`09217`20`7D`7D,
- X`09`7B`7B`20181,`09181`20`7D,`09`7B`20183,`09183`20`7D`7D,`09`7B`7B`20181,`092
- V17`20`7D,`09`7B`20183,`09217`20`7D`7D,
- X`09`7B`7B`20181,`09183`20`7D,`09`7B`20183,`09183`20`7D`7D,`09`7B`7B`20217,`092
- V17`20`7D,`09`7B`20217,`09183`20`7D`7D,
- X`09`7B`7B`20217,`09217`20`7D,`09`7B`20219,`09217`20`7D`7D,`09`7B`7B`20217,`091
- V83`20`7D,`09`7B`20219,`09183`20`7D`7D,
- X`09`7B`7B`20217,`09217`20`7D,`09`7B`20219,`09219`20`7D`7D,`09`7B`7B`20217,`091
- V83`20`7D,`09`7B`20219,`09181`20`7D`7D,
- X`09`7B`7B`20184,`09216`20`7D,`09`7B`20184,`09184`20`7D`7D,`09`7B`7B`20184,`092
- V16`20`7D,`09`7B`20216,`09216`20`7D`7D,
- X`09`7B`7B`20184,`09184`20`7D,`09`7B`20216,`09184`20`7D`7D,`09`7B`7B`20183,`092
- V17`20`7D,`09`7B`20184,`09216`20`7D`7D,
- X`09`7B`7B`20183,`09183`20`7D,`09`7B`20184,`09184`20`7D`7D,`09`7B`7B`20183,`092
- V16`20`7D,`09`7B`20184,`09216`20`7D`7D,
- X`09`7B`7B`20183,`09184`20`7D,`09`7B`20184,`09184`20`7D`7D,`09`7B`7B`20216,`092
- V16`20`7D,`09`7B`20216,`09184`20`7D`7D,
- X`09`7B`7B`20216,`09216`20`7D,`09`7B`20217,`09216`20`7D`7D,`09`7B`7B`20216,`091
- V84`20`7D,`09`7B`20217,`09184`20`7D`7D,
- X`09`7B`7B`20216,`09216`20`7D,`09`7B`20217,`09217`20`7D`7D,`09`7B`7B`20216,`091
- V84`20`7D,`09`7B`20217,`09183`20`7D`7D,
- X`09`7B`7B`20186,`09214`20`7D,`09`7B`20186,`09186`20`7D`7D,`09`7B`7B`20186,`092
- V14`20`7D,`09`7B`20214,`09214`20`7D`7D,
- X`09`7B`7B`20186,`09186`20`7D,`09`7B`20214,`09186`20`7D`7D,`09`7B`7B`20184,`092
- V16`20`7D,`09`7B`20186,`09214`20`7D`7D,
- X`09`7B`7B`20184,`09184`20`7D,`09`7B`20186,`09186`20`7D`7D,`09`7B`7B`20184,`092
- V14`20`7D,`09`7B`20186,`09214`20`7D`7D,
- X`09`7B`7B`20184,`09186`20`7D,`09`7B`20186,`09186`20`7D`7D,`09`7B`7B`20214,`092
- V14`20`7D,`09`7B`20214,`09186`20`7D`7D,
- X`09`7B`7B`20214,`09214`20`7D,`09`7B`20216,`09214`20`7D`7D,`09`7B`7B`20214,`091
- V86`20`7D,`09`7B`20216,`09186`20`7D`7D,
- X`09`7B`7B`20214,`09214`20`7D,`09`7B`20216,`09216`20`7D`7D,`09`7B`7B`20214,`091
- V86`20`7D,`09`7B`20216,`09184`20`7D`7D,
- X`09`7B`7B`20187,`09213`20`7D,`09`7B`20187,`09187`20`7D`7D,`09`7B`7B`20187,`092
- V13`20`7D,`09`7B`20213,`09213`20`7D`7D,
- X`09`7B`7B`20187,`09187`20`7D,`09`7B`20213,`09187`20`7D`7D,`09`7B`7B`20186,`092
- V14`20`7D,`09`7B`20187,`09213`20`7D`7D,
- X`09`7B`7B`20186,`09186`20`7D,`09`7B`20187,`09187`20`7D`7D,`09`7B`7B`20186,`092
- V13`20`7D,`09`7B`20187,`09213`20`7D`7D,
- X`09`7B`7B`20186,`09187`20`7D,`09`7B`20187,`09187`20`7D`7D,`09`7B`7B`20213,`092
- V13`20`7D,`09`7B`20213,`09187`20`7D`7D,
- X`09`7B`7B`20213,`09213`20`7D,`09`7B`20214,`09213`20`7D`7D,`09`7B`7B`20213,`091
- V87`20`7D,`09`7B`20214,`09187`20`7D`7D,
- X`09`7B`7B`20213,`09213`20`7D,`09`7B`20214,`09214`20`7D`7D,`09`7B`7B`20213,`091
- V87`20`7D,`09`7B`20214,`09186`20`7D`7D,
- X`09`7B`7B`20188,`09212`20`7D,`09`7B`20188,`09188`20`7D`7D,`09`7B`7B`20188,`092
- V12`20`7D,`09`7B`20212,`09212`20`7D`7D,
- X`09`7B`7B`20188,`09188`20`7D,`09`7B`20212,`09188`20`7D`7D,`09`7B`7B`20187,`092
- V13`20`7D,`09`7B`20188,`09212`20`7D`7D,
- X`09`7B`7B`20187,`09187`20`7D,`09`7B`20188,`09188`20`7D`7D,`09`7B`7B`20187,`092
- V12`20`7D,`09`7B`20188,`09212`20`7D`7D,
- X`09`7B`7B`20187,`09188`20`7D,`09`7B`20188,`09188`20`7D`7D,`09`7B`7B`20212,`092
- V12`20`7D,`09`7B`20212,`09188`20`7D`7D,
- X`09`7B`7B`20212,`09212`20`7D,`09`7B`20213,`09212`20`7D`7D,`09`7B`7B`20212,`091
- V88`20`7D,`09`7B`20213,`09188`20`7D`7D,
- X`09`7B`7B`20212,`09212`20`7D,`09`7B`20213,`09213`20`7D`7D,`09`7B`7B`20212,`091
- V88`20`7D,`09`7B`20213,`09187`20`7D`7D,
- X`09`7B`7B`20188,`09212`20`7D,`09`7B`20188,`09188`20`7D`7D,`09`7B`7B`20188,`092
- V12`20`7D,`09`7B`20212,`09212`20`7D`7D,
- X`09`7B`7B`20188,`09188`20`7D,`09`7B`20212,`09188`20`7D`7D,`09`7B`7B`20188,`092
- V12`20`7D,`09`7B`20188,`09212`20`7D`7D,
- X`09`7B`7B`20188,`09188`20`7D,`09`7B`20188,`09188`20`7D`7D,`09`7B`7B`20188,`092
- V12`20`7D,`09`7B`20188,`09212`20`7D`7D,
- X`09`7B`7B`20188,`09188`20`7D,`09`7B`20188,`09188`20`7D`7D,`09`7B`7B`20212,`092
- V12`20`7D,`09`7B`20212,`09188`20`7D`7D,
- X`09`7B`7B`20212,`09212`20`7D,`09`7B`20212,`09212`20`7D`7D,`09`7B`7B`20212,`091
- V88`20`7D,`09`7B`20212,`09188`20`7D`7D,
- X`09`7B`7B`20212,`09212`20`7D,`09`7B`20212,`09212`20`7D`7D,`09`7B`7B`20212,`091
- V88`20`7D,`09`7B`20212,`09188`20`7D`7D,
- X`09`7B`7B`20189,`09211`20`7D,`09`7B`20189,`09189`20`7D`7D,`09`7B`7B`20189,`092
- V11`20`7D,`09`7B`20211,`09211`20`7D`7D,
- X`09`7B`7B`20189,`09189`20`7D,`09`7B`20211,`09189`20`7D`7D,`09`7B`7B`20188,`092
- V12`20`7D,`09`7B`20189,`09211`20`7D`7D,
- X`09`7B`7B`20188,`09188`20`7D,`09`7B`20189,`09189`20`7D`7D,`09`7B`7B`20188,`092
- V11`20`7D,`09`7B`20189,`09211`20`7D`7D,
- X`09`7B`7B`20188,`09189`20`7D,`09`7B`20189,`09189`20`7D`7D,`09`7B`7B`20211,`092
- V11`20`7D,`09`7B`20211,`09189`20`7D`7D,
- X`09`7B`7B`20211,`09211`20`7D,`09`7B`20212,`09211`20`7D`7D,`09`7B`7B`20211,`091
- V89`20`7D,`09`7B`20212,`09189`20`7D`7D,
- X`09`7B`7B`20211,`09211`20`7D,`09`7B`20212,`09212`20`7D`7D,`09`7B`7B`20211,`091
- V89`20`7D,`09`7B`20212,`09188`20`7D`7D,
- X`09`7B`7B`20190,`09210`20`7D,`09`7B`20190,`09190`20`7D`7D,`09`7B`7B`20190,`092
- V10`20`7D,`09`7B`20210,`09210`20`7D`7D,
- X`09`7B`7B`20190,`09190`20`7D,`09`7B`20210,`09190`20`7D`7D,`09`7B`7B`20189,`092
- V11`20`7D,`09`7B`20190,`09210`20`7D`7D,
- X`09`7B`7B`20189,`09189`20`7D,`09`7B`20190,`09190`20`7D`7D,`09`7B`7B`20189,`092
- V10`20`7D,`09`7B`20190,`09210`20`7D`7D,
- X`09`7B`7B`20189,`09190`20`7D,`09`7B`20190,`09190`20`7D`7D,`09`7B`7B`20210,`092
- V10`20`7D,`09`7B`20210,`09190`20`7D`7D,
- X`09`7B`7B`20210,`09210`20`7D,`09`7B`20211,`09210`20`7D`7D,`09`7B`7B`20210,`091
- V90`20`7D,`09`7B`20211,`09190`20`7D`7D,
- X`09`7B`7B`20210,`09210`20`7D,`09`7B`20211,`09211`20`7D`7D,`09`7B`7B`20210,`091
- V90`20`7D,`09`7B`20211,`09189`20`7D`7D,
- X`09`7B`7B`20190,`09210`20`7D,`09`7B`20190,`09190`20`7D`7D,`09`7B`7B`20190,`092
- V10`20`7D,`09`7B`20210,`09210`20`7D`7D,
- X`09`7B`7B`20190,`09190`20`7D,`09`7B`20210,`09190`20`7D`7D,`09`7B`7B`20190,`092
- V10`20`7D,`09`7B`20190,`09210`20`7D`7D,
- X`09`7B`7B`20190,`09190`20`7D,`09`7B`20190,`09190`20`7D`7D,`09`7B`7B`20190,`092
- V10`20`7D,`09`7B`20190,`09210`20`7D`7D,
- X`09`7B`7B`20190,`09190`20`7D,`09`7B`20190,`09190`20`7D`7D,`09`7B`7B`20210,`092
- V10`20`7D,`09`7B`20210,`09190`20`7D`7D,
- X`09`7B`7B`20210,`09210`20`7D,`09`7B`20210,`09210`20`7D`7D,`09`7B`7B`20210,`091
- V90`20`7D,`09`7B`20210,`09190`20`7D`7D,
- X`09`7B`7B`20210,`09210`20`7D,`09`7B`20210,`09210`20`7D`7D,`09`7B`7B`20210,`091
- V90`20`7D,`09`7B`20210,`09190`20`7D`7D,
- X`09`7B`7B`20191,`09209`20`7D,`09`7B`20191,`09191`20`7D`7D,`09`7B`7B`20191,`092
- V09`20`7D,`09`7B`20209,`09209`20`7D`7D,
- X`09`7B`7B`20191,`09191`20`7D,`09`7B`20209,`09191`20`7D`7D,`09`7B`7B`20190,`092
- V10`20`7D,`09`7B`20191,`09209`20`7D`7D,
- X`09`7B`7B`20190,`09190`20`7D,`09`7B`20191,`09191`20`7D`7D,`09`7B`7B`20190,`092
- V09`20`7D,`09`7B`20191,`09209`20`7D`7D,
- X`09`7B`7B`20190,`09191`20`7D,`09`7B`20191,`09191`20`7D`7D,`09`7B`7B`20209,`092
- V09`20`7D,`09`7B`20209,`09191`20`7D`7D,
- X`09`7B`7B`20209,`09209`20`7D,`09`7B`20210,`09209`20`7D`7D,`09`7B`7B`20209,`091
- V91`20`7D,`09`7B`20210,`09191`20`7D`7D,
- X`09`7B`7B`20209,`09209`20`7D,`09`7B`20210,`09210`20`7D`7D,`09`7B`7B`20209,`091
- V91`20`7D,`09`7B`20210,`09190`20`7D`7D,
- X`09`7B`7B`20191,`09209`20`7D,`09`7B`20191,`09191`20`7D`7D,`09`7B`7B`20191,`092
- V09`20`7D,`09`7B`20209,`09209`20`7D`7D,
- X`09`7B`7B`20191,`09191`20`7D,`09`7B`20209,`09191`20`7D`7D,`09`7B`7B`20191,`092
- V09`20`7D,`09`7B`20191,`09209`20`7D`7D,
- X`09`7B`7B`20191,`09191`20`7D,`09`7B`20191,`09191`20`7D`7D,`09`7B`7B`20191,`092
- V09`20`7D,`09`7B`20191,`09209`20`7D`7D,
- X`09`7B`7B`20191,`09191`20`7D,`09`7B`20191,`09191`20`7D`7D,`09`7B`7B`20209,`092
- V09`20`7D,`09`7B`20209,`09191`20`7D`7D,
- X`09`7B`7B`20209,`09209`20`7D,`09`7B`20209,`09209`20`7D`7D,`09`7B`7B`20209,`091
- V91`20`7D,`09`7B`20209,`09191`20`7D`7D,
- X`09`7B`7B`20209,`09209`20`7D,`09`7B`20209,`09209`20`7D`7D,`09`7B`7B`20209,`091
- V91`20`7D,`09`7B`20209,`09191`20`7D`7D,
- X`09`7B`7B`20192,`09208`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20192,`092
- V08`20`7D,`09`7B`20208,`09208`20`7D`7D,
- X`09`7B`7B`20192,`09192`20`7D,`09`7B`20208,`09192`20`7D`7D,`09`7B`7B`20191,`092
- V09`20`7D,`09`7B`20192,`09208`20`7D`7D,
- X`09`7B`7B`20191,`09191`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20191,`092
- V08`20`7D,`09`7B`20192,`09208`20`7D`7D,
- X`09`7B`7B`20191,`09192`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20208,`092
- V08`20`7D,`09`7B`20208,`09192`20`7D`7D,
- X`09`7B`7B`20208,`09208`20`7D,`09`7B`20209,`09208`20`7D`7D,`09`7B`7B`20208,`091
- V92`20`7D,`09`7B`20209,`09192`20`7D`7D,
- X`09`7B`7B`20208,`09208`20`7D,`09`7B`20209,`09209`20`7D`7D,`09`7B`7B`20208,`091
- V92`20`7D,`09`7B`20209,`09191`20`7D`7D,
- X`09`7B`7B`20192,`09208`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20192,`092
- V08`20`7D,`09`7B`20208,`09208`20`7D`7D,
- X`09`7B`7B`20192,`09192`20`7D,`09`7B`20208,`09192`20`7D`7D,`09`7B`7B`20192,`092
- V08`20`7D,`09`7B`20192,`09208`20`7D`7D,
- X`09`7B`7B`20192,`09192`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20192,`092
- V08`20`7D,`09`7B`20192,`09208`20`7D`7D,
- X`09`7B`7B`20192,`09192`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20208,`092
- V08`20`7D,`09`7B`20208,`09192`20`7D`7D,
- X`09`7B`7B`20208,`09208`20`7D,`09`7B`20208,`09208`20`7D`7D,`09`7B`7B`20208,`091
- V92`20`7D,`09`7B`20208,`09192`20`7D`7D,
- X`09`7B`7B`20208,`09208`20`7D,`09`7B`20208,`09208`20`7D`7D,`09`7B`7B`20208,`091
- V92`20`7D,`09`7B`20208,`09192`20`7D`7D,
- X`09`7B`7B`20192,`09208`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20192,`092
- V08`20`7D,`09`7B`20208,`09208`20`7D`7D,
- X`09`7B`7B`20192,`09192`20`7D,`09`7B`20208,`09192`20`7D`7D,`09`7B`7B`20192,`092
- V08`20`7D,`09`7B`20192,`09208`20`7D`7D,
- X`09`7B`7B`20192,`09192`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20192,`092
- V08`20`7D,`09`7B`20192,`09208`20`7D`7D,
- X`09`7B`7B`20192,`09192`20`7D,`09`7B`20192,`09192`20`7D`7D,`09`7B`7B`20208,`092
- V08`20`7D,`09`7B`20208,`09192`20`7D`7D,
- X`09`7B`7B`20208,`09208`20`7D,`09`7B`20208,`09208`20`7D`7D,`09`7B`7B`20208,`091
- V92`20`7D,`09`7B`20208,`09192`20`7D`7D,
- X`09`7B`7B`20208,`09208`20`7D,`09`7B`20208,`09208`20`7D`7D,`09`7B`7B`20208,`091
- V92`20`7D,`09`7B`20208,`09192`20`7D`7D,
- X`09`7B`7B`20193,`09207`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20207,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20207,`09193`20`7D`7D,`09`7B`7B`20192,`092
- V08`20`7D,`09`7B`20193,`09207`20`7D`7D,
- X`09`7B`7B`20192,`09192`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20192,`092
- V07`20`7D,`09`7B`20193,`09207`20`7D`7D,
- X`09`7B`7B`20192,`09193`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20207,`092
- V07`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20207,`09207`20`7D,`09`7B`20208,`09207`20`7D`7D,`09`7B`7B`20207,`091
- V93`20`7D,`09`7B`20208,`09193`20`7D`7D,
- X`09`7B`7B`20207,`09207`20`7D,`09`7B`20208,`09208`20`7D`7D,`09`7B`7B`20207,`091
- V93`20`7D,`09`7B`20208,`09192`20`7D`7D,
- X`09`7B`7B`20193,`09207`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20207,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20207,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20193,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20193,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20207,`092
- V07`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20207,`09207`20`7D,`09`7B`20207,`09207`20`7D`7D,`09`7B`7B`20207,`091
- V93`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20207,`09207`20`7D,`09`7B`20207,`09207`20`7D`7D,`09`7B`7B`20207,`091
- V93`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20193,`09207`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20207,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20207,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20193,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20193,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20207,`092
- V07`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20207,`09207`20`7D,`09`7B`20207,`09207`20`7D`7D,`09`7B`7B`20207,`091
- V93`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20207,`09207`20`7D,`09`7B`20207,`09207`20`7D`7D,`09`7B`7B`20207,`091
- V93`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20193,`09207`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20207,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20207,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20193,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20193,`09207`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20193,`09193`20`7D`7D,`09`7B`7B`20207,`092
- V07`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20207,`09207`20`7D,`09`7B`20207,`09207`20`7D`7D,`09`7B`7B`20207,`091
- V93`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20207,`09207`20`7D,`09`7B`20207,`09207`20`7D`7D,`09`7B`7B`20207,`091
- V93`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20194,`09206`20`7D,`09`7B`20194,`09194`20`7D`7D,`09`7B`7B`20194,`092
- V06`20`7D,`09`7B`20206,`09206`20`7D`7D,
- X`09`7B`7B`20194,`09194`20`7D,`09`7B`20206,`09194`20`7D`7D,`09`7B`7B`20193,`092
- V07`20`7D,`09`7B`20194,`09206`20`7D`7D,
- X`09`7B`7B`20193,`09193`20`7D,`09`7B`20194,`09194`20`7D`7D,`09`7B`7B`20193,`092
- V06`20`7D,`09`7B`20194,`09206`20`7D`7D,
- X`09`7B`7B`20193,`09194`20`7D,`09`7B`20194,`09194`20`7D`7D,`09`7B`7B`20206,`092
- V06`20`7D,`09`7B`20206,`09194`20`7D`7D,
- X`09`7B`7B`20206,`09206`20`7D,`09`7B`20207,`09206`20`7D`7D,`09`7B`7B`20206,`091
- V94`20`7D,`09`7B`20207,`09194`20`7D`7D,
- X`09`7B`7B`20206,`09206`20`7D,`09`7B`20207,`09207`20`7D`7D,`09`7B`7B`20206,`091
- V94`20`7D,`09`7B`20207,`09193`20`7D`7D,
- X`09`7B`7B`20194,`09206`20`7D,`09`7B`20194,`09194`20`7D`7D,`09`7B`7B`20194,`092
- V06`20`7D,`09`7B`20206,`09206`20`7D`7D,
- X`09`7B`7B`20194,`09194`20`7D,`09`7B`20206,`09194`20`7D`7D,`09`7B`7B`20194,`092
- V06`20`7D,`09`7B`20194,`09206`20`7D`7D,
- X`09`7B`7B`20194,`09194`20`7D,`09`7B`20194,`09194`20`7D`7D,`09`7B`7B`20194,`092
- V06`20`7D,`09`7B`20194,`09206`20`7D`7D,
- X`09`7B`7B`20194,`09194`20`7D,`09`7B`20194,`09194`20`7D`7D,`09`7B`7B`20206,`092
- V06`20`7D,`09`7B`20206,`09194`20`7D`7D,
- X`09`7B`7B`20206,`09206`20`7D,`09`7B`20206,`09206`20`7D`7D,`09`7B`7B`20206,`091
- V94`20`7D,`09`7B`20206,`09194`20`7D`7D,
- X`09`7B`7B`20206,`09206`20`7D,`09`7B`20206,`09206`20`7D`7D,`09`7B`7B`20206,`091
- V94`20`7D,`09`7B`20206,`09194`20`7D`7D,
- X`7D;
- X
- X#define`20ratBits_width`20384
- X#define`20ratBits_height`2064
- Xstatic`20short`09ratBits`5B`5D`20=`20`7B
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X`20`20`20`200x0007,`200xe000,`200x0007,`200xe000,`200x003c,`200x0000,`200x3c00
- V,`200x0df0,
- X
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x001f,`200xf800
- V,`200x0000,
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X`20`20`20`200x003f,`200xfc00,`200x003f,`200xfc00,`200x008f,`200x0000,`200x9f00
- V,`200x13f8,
- X
- X`20`20`20`200x0000,`200x001f,`200xf800,`200x0000,`200x0000,`200x01ff,`200xff80
- V,`200x0000,
- X`20`20`20`200x0000,`200x001f,`200xf800,`200x0000,`200x0000,`200x001f,`200xf800
- V,`200x0000,
- X`20`20`20`200x00f3,`200xff00,`200x00f3,`200xff00,`200x037f,`200xc003,`200x7fc0
- V,`200x2ffc,
- X
- X`20`20`20`200x0000,`200x01ff,`200xff80,`200x0000,`200x0000,`200x0fff,`200xfff0
- V,`200x0000,
- X`20`20`20`200x0000,`200x01ff,`200xff80,`200x0000,`200x0000,`200x01ff,`200xff80
- V,`200x0000,
- X`20`20`20`200x01c7,`200xff80,`200x01c7,`200xff80,`200x04ff,`200xe004,`200xffe0
- V,`200x2ffc,
- X
- X`20`20`20`200x0000,`200x0fff,`200xfff0,`200x0000,`200x0000,`200x3fff,`200xfffc
- V,`200x0000,
- X`20`20`20`200x0000,`200x0fff,`200xfff0,`200x0000,`200x0000,`200x0fff,`200xfff0
- V,`200x0000,
- X`20`20`20`200x031f,`200xffc0,`200x031f,`200xffc0,`200x0bff,`200xf00b,`200xfff0
- V,`200x47fe,
- X
- X`20`20`20`200x0000,`200x3fff,`200xfffc,`200x0000,`200x0000,`200xffe3,`200xffff
- V,`200x0000,
- X`20`20`20`200x0000,`200x3fff,`200xfffc,`200x0000,`200x0000,`200x3fff,`200xfffc
- V,`200x0000,
- X`20`20`20`200x067f,`200xffe0,`200x067f,`200xffe0,`200x0bff,`200xf00f,`200xfff0
- V,`200x63fe,
- X
- X`20`20`20`200x0000,`200xffe3,`200xffff,`200x0000,`200x0001,`200xe79f,`200xffff
- V,`200x8000,
- X`20`20`20`200x0000,`200xffe3,`200xffff,`200x0000,`200x0000,`200xff8f,`200xffff
- V,`200x0000,
- X`20`20`20`200x0cff,`200xfff0,`200x0cff,`200xfff0,`200x11ff,`200xf81f,`200xfff8
- V,`200x63fe,
- X
- X`20`20`20`200x0001,`200xe79f,`200xffff,`200x8000,`200x0003,`200xf03f,`200xffff
- V,`200xc000,
- X`20`20`20`200x0001,`200xe79f,`200xffff,`200x8000,`200x0001,`200xe60f,`200xffff
- V,`200x8000,
- X`20`20`20`200x0bff,`200xfff0,`200x0bff,`200xfff0,`200x10ff,`200xf81f,`200xfff8
- V,`200x47fe,
- X
- X`20`20`20`200x0003,`200xf03f,`200xffff,`200xc000,`200x0007,`200xc07f,`200xffff
- V,`200xe000,
- X`20`20`20`200x0003,`200xf03f,`200xffff,`200xc000,`200x0003,`200xf83f,`200xffff
- V,`200xc000,
- X`20`20`20`200x19ff,`200xfff8,`200x1fff,`200xfff8,`200x307f,`200xfc3f,`200xfffc
- V,`200x2ffc,
- X
- X`20`20`20`200x0007,`200xc07f,`200xffff,`200xe000,`200x000d,`200x01ff,`200xffff
- V,`200xf000,
- X`20`20`20`200x0007,`200xc07f,`200xffff,`200xe000,`200x0007,`200xc03f,`200xffff
- V,`200xe000,
- X`20`20`20`200x10ff,`200xfff8,`200x1fff,`200xfff8,`200x383f,`200xfc3f,`200xfffc
- V,`200x3ffc,
- X
- X`20`20`20`200x000d,`200x01ff,`200xffff,`200xf000,`200x0018,`200x0dff,`200xffff
- V,`200xf800,
- X`20`20`20`200x000d,`200x01ff,`200xffff,`200xf000,`200x000f,`200x01ff,`200xffff
- V,`200xf000,
- X`20`20`20`200x087f,`200xfff8,`200x1fff,`200xfff8,`200x383f,`200xfc3f,`200xfffc
- V,`200x1ff8,
- X
- X`20`20`20`200x0018,`200x0dff,`200xffff,`200xf800,`200x003c,`200x3eff,`200xffff
- V,`200xfc00,
- X`20`20`20`200x0018,`200x0dff,`200xffff,`200xf800,`200x001c,`200x0dff,`200xffff
- V,`200xf800,
- X`20`20`20`200x183f,`200xfffc,`200x3fff,`200xfffc,`200x307f,`200xfc3f,`200xfffc
- V,`200x1bdc,
- X
- X`20`20`20`200x003c,`200x3eff,`200xffff,`200xfc00,`200x0078,`200xfcff,`200xffff
- V,`200xfe00,
- X`20`20`20`200x003c,`200x3eff,`200xffff,`200xfc00,`200x003c,`200x3eff,`200xffff
- V,`200xfc00,
- X`20`20`20`200x1c1f,`200xfffc,`200x3fff,`200xfffc,`200x10ff,`200xf81f,`200xfff8
- V,`200x2e3a,
- X
- X`20`20`20`200x0078,`200xfcff,`200xffff,`200xfe00,`200x00f1,`200x7eff,`200xffff
- V,`200xff00,
- X`20`20`20`200x0078,`200xfcff,`200xffff,`200xfe00,`200x0078,`200xfcff,`200xffff
- V,`200xfe00,
- X`20`20`20`200x3c0f,`200xfffc,`200x3fff,`200xfffc,`200x11ff,`200xf81f,`200xfff8
- V,`200x17f4,
- X
- X`20`20`20`200x00f1,`200x7eff,`200xffff,`200xff00,`200x00e3,`200x9fff,`200xffff
- V,`200xff00,
- X`20`20`20`200x00f1,`200x7eff,`200xffff,`200xff00,`200x00f1,`200x7eff,`200xffff
- V,`200xff00,
- X`20`20`20`200x3c0f,`200xfffc,`200x3fff,`200xfffc,`200x0fff,`200xf00f,`200xfff0
- V,`200x0000,
- X
- X`20`20`20`200x00e3,`200x9fff,`200xffff,`200xff00,`200x01ef,`200xcfff,`200xffff
- V,`200xff80,
- X`20`20`20`200x00e3,`200x9fff,`200xffff,`200xff00,`200x00e3,`200x9fff,`200xffff
- V,`200xff00,
- X`20`20`20`200x3c1f,`200xfffc,`200x3fff,`200xfffc,`200x0fff,`200xf00f,`200xfff0
- V,`200x03c0,
- X
- X`20`20`20`200x01ef,`200xcfff,`200xffff,`200xff80,`200x01df,`200xffff,`200xffff
- V,`200xfc80,
- X`20`20`20`200x01ef,`200xcfff,`200xffff,`200xff80,`200x01e7,`200xcfff,`200xffff
- V,`200xff80,
- X`20`20`20`200x383f,`200xfffc,`200x3fff,`200xfffc,`200x07ff,`200xe007,`200xffe0
- V,`200x0df0,
- X
- X`20`20`20`200x013f,`200xffff,`200xffff,`200xff80,`200x03ff,`200xffff,`200xffff
- V,`200xc0c0,
- X`20`20`20`200x01df,`200xffff,`200xffff,`200xff80,`200x01df,`200xffff,`200xffff
- V,`200xff80,
- X`20`20`20`200x187f,`200xfff8,`200x1fff,`200xfff8,`200x03ff,`200xc003,`200xffc0
- V,`200x13f8,
- X
- X`20`20`20`200x0303,`200xffff,`200xffff,`200xffc0,`200x03ff,`200xffff,`200xfffe
- V,`200x0040,
- X`20`20`20`200x03ff,`200xffff,`200xffff,`200xffc0,`200x03ff,`200xffe0,`200x07ff
- V,`200xffc0,
- X`20`20`20`200x10ff,`200xfff8,`200x1fff,`200xfff8,`200x0b7e,`200x680b,`200x7e68
- V,`200x2ffc,
- X
- X`20`20`20`200x0200,`200x7fff,`200xffff,`200xffc0,`200x03ff,`200xffff,`200xfff8
- V,`200x0040,
- X`20`20`20`200x03ff,`200xffff,`200xffff,`200xffc0,`200x03ff,`200xff00,`200x00ff
- V,`200xffc0,
- X`20`20`20`200x19ff,`200xfff8,`200x1fff,`200xfff8,`200x15f9,`200xd415,`200xf9d4
- V,`200x3ff4,
- X
- X`20`20`20`200x0200,`200x1fff,`200xffff,`200xffc0,`200x07ff,`200xffff,`200xffe0
- V,`200x0060,
- X`20`20`20`200x03ff,`200xffff,`200xffff,`200xffc0,`200x03ff,`200xf800,`200x001f
- V,`200xffc0,
- X`20`20`20`200x0fff,`200xfff0,`200x0fff,`200xfff0,`200x0aae,`200xa80a,`200xaea8
- V,`200x7fe2,
- X
- X`20`20`20`200x0600,`200x07ff,`200xffff,`200xffe0,`200x07ff,`200xffff,`200xffc0
- V,`200x00e0,
- X`20`20`20`200x07ff,`200xffff,`200xffff,`200xffe0,`200x07ff,`200xc000,`200x0003
- V,`200xffe0,
- X`20`20`20`200x0fff,`200xfff0,`200x0fff,`200xfff0,`200x0155,`200x4001,`200x5540
- V,`200x7fc6,
- X
- X`20`20`20`200x0700,`200xcfff,`200xffff,`200xffe0,`200x07ff,`200xffff,`200xff0a
- V,`200x00e0,
- X`20`20`20`200x07ff,`200xffff,`200xffff,`200xffe0,`200x07ff,`200x0007,`200xe000
- V,`200xffe0,
- X`20`20`20`200x07ff,`200xff60,`200x07ff,`200xff60,`200x0000,`200x0000,`200x0000
- V,`200x7fc6,
- X
- X`20`20`20`200x0700,`200x30ff,`200xffff,`200xffe0,`200x07ff,`200xffff,`200xfe0c
- V,`200x00e0,
- X`20`20`20`200x07ff,`200xffff,`200xffff,`200xffe0,`200x07fc,`200x000d,`200xb800
- V,`200x3fe0,
- X`20`20`20`200x03ff,`200xfcc0,`200x03ff,`200xfcc0,`200x0000,`200x0000,`200x0000
- V,`200x7fe2,
- X
- X`20`20`20`200x0700,`200x407f,`200xffff,`200xffe0,`200x0fff,`200xffff,`200xfc38
- V,`200x01f0,
- X`20`20`20`200x07ff,`200xffff,`200xffff,`200xffe0,`200x07f0,`200x0005,`200xbc00
- V,`200x0fe0,
- X`20`20`20`200x07ff,`200xff68,`200x07ff,`200xff68,`200x003c,`200x0000,`200x3c00
- V,`200x3ff4,
- X
- X`20`20`20`200x0f81,`200x003f,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xf875
- V,`200x81b0,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0fc0,`200x0003,`200x7602
- V,`200x03f0,
- X`20`20`20`200x15ff,`200xf9d4,`200x15ff,`200xf9d4,`200x009f,`200x0000,`200x9f00
- V,`200x3ffc,
- X
- X`20`20`20`200x0d80,`200x021f,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xf382
- V,`200x41f0,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0fc1,`200x0043,`200xce00
- V,`200x8df0,
- X`20`20`20`200x2adf,`200xe3aa,`200x2adf,`200xe3aa,`200x037f,`200xc003,`200x7fc0
- V,`200x1ff8,
- X
- X`20`20`20`200x0f80,`200x01cf,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xee00
- V,`200x0170,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0f2a,`200x00c3,`200xef00
- V,`200x70f0,
- X`20`20`20`200x157c,`200x3f54,`200x157c,`200x3f54,`200x04ff,`200xe004,`200xffe0
- V,`200x1bdc,
- X
- X`20`20`20`200x0e80,`200x6677,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xfc00
- V,`200x0170,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0e6d,`200x0091,`200xf900
- V,`200x8070,
- X`20`20`20`200x0aaf,`200xfaa8,`200x0aaf,`200xfaa8,`200x0bff,`200xf00b,`200xfff0
- V,`200x2e3a,
- X
- X`20`20`20`200x0e80,`200x183f,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xc000
- V,`200x0170,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0c10,`200x00f8,`200xff00
- V,`200x03b0,
- X`20`20`20`200x0155,`200x5540,`200x0155,`200x5540,`200x0fff,`200xd00f,`200x81f0
- V,`200x17f4,
- X
- X`20`20`20`200x0e80,`200x0003,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xe000
- V,`200x01f0,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0c0c,`200x00ff,`200xf700
- V,`200x25f0,
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x1fff,`200x881e,`200x0078
- V,`200x0000,
- X
- X`20`20`20`200x0f80,`200x0007,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xf000
- V,`200x01f0,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0e02,`200x0097,`200xf900
- V,`200x1c70,
- X`20`20`20`200x0000,`200x0000,`200x0000,`200x0000,`200x1fff,`200x0818,`200x1818
- V,`200x03c0,
- X
- X`20`20`20`200x0f80,`200x000f,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xf800
- V,`200x01f0,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0f01,`200x00fb,`200xe700
- V,`200x00f0,
- X`20`20`20`200x0007,`200xe000,`200x0007,`200xe000,`200x3ffe,`200x0c30,`200x1c0c
- V,`200x0df0,
- X
- X`20`20`20`200x0f80,`200x601f,`200xffff,`200xfff0,`200x0fff,`200xffff,`200xfc00
- V,`200x01b0,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0f80,`200x0075,`200xde00
- V,`200x51f0,
- X`20`20`20`200x003f,`200xfc00,`200x003f,`200xfc00,`200x3ffc,`200x1c20,`200x4e04
- V,`200x13f8,
- X
- X`20`20`20`200x0d80,`200x91ff,`200xffff,`200xfff0,`200x07ff,`200xffff,`200xfe00
- V,`200x01e0,
- X`20`20`20`200x0fff,`200xffff,`200xffff,`200xfff0,`200x0fc0,`200x006f,`200x1604
- V,`200x8bf0,
- X`20`20`20`200x00f3,`200xff00,`200x00f3,`200xff00,`200x3ffc,`200x1c20,`200x6e04
- V,`200x2ffc,
- X
- X`20`20`20`200x0780,`200x0f7f,`200xffff,`200xffe0,`200x07ff,`200xffff,`200xff00
- V,`200x00e0,
- X`20`20`20`200x07ff,`200xffff,`200xffff,`200xffe0,`200x07f0,`200x0039,`200x7c03
- V,`200x07e0,
- X`20`20`20`200x01c7,`200xff80,`200x01c7,`200xff80,`200x3ffe,`200x0c30,`200x7e0c
- V,`200x3ffc,
- X
- X`20`20`20`200x0700,`200x00ff,`200xffff,`200xffe0,`200x07ff,`200xffff,`200xffc0
- V,`200x00e0,
- X`20`20`20`200x07ff,`200xffff,`200xffff,`200xffe0,`200x07fc,`200x001d,`200xb810
- V,`200x1fe0,
- X`20`20`20`200x031f,`200xffc0,`200x031f,`200xffc0,`200x1fff,`200x0818,`200x3c18
- V,`200x7ffe,
- X
- X`20`20`20`200x0710,`200x03ff,`200xffff,`200xffe0,`200x07ff,`200xffff,`200xffe0
- V,`200x00e0,
- X`20`20`20`200x07ff,`200xffff,`200xffff,`200xffe0,`200x07ff,`200x0007,`200xe208
- V,`200x7fe0,
- X`20`20`20`200x067f,`200xffe0,`200x067f,`200xffe0,`200x1fff,`200x881e,`200x1878
- V,`200x7ffe,
- X
- X`20`20`20`200x0708,`200x07ff,`200xffff,`200xffe0,`200x03ff,`200xffff,`200xfff8
- V,`200x00c0,
- X`20`20`20`200x07ff,`200xffff,`200xffff,`200xffe0,`200x07ff,`200xc000,`200x0191
- V,`200xffe0,
- X`20`20`20`200x0cff,`200xfff0,`200x0cff,`200xfff0,`200x0fff,`200xf00f,`200x81f0
- V,`200x7ffe,
- X
- X`20`20`20`200x0228,`200x1fff,`200xffff,`200xffc0,`200x03ff,`200xffff,`200xfffe
- V,`200x01c0,
- X`20`20`20`200x03ff,`200xffff,`200xffff,`200xffc0,`200x03ff,`200xf800,`200x0077
- V,`200xffc0,
- X`20`20`20`200x0bff,`200xfff0,`200x0bff,`200xfff0,`200x0fff,`200xf00f,`200xfff0
- V,`200x7ffe,
- X
- X`20`20`20`200x0214,`200x7fff,`200xffff,`200xffc0,`200x03ff,`200xffff,`200xffff
- V,`200xc1c0,
- X`20`20`20`200x03ff,`200xffff,`200xffff,`200xffc0,`200x03ff,`200xff00,`200x001f
- V,`200xffc0,
- X`20`20`20`200x1fff,`200xff98,`200x1ff0,`200x0ff8,`200x07ff,`200xe007,`200xffe0
- V,`200x3ffc,
- X
- X`20`20`20`200x0203,`200xffff,`200xffff,`200xffc0,`200x01ff,`200xffff,`200xffff
- V,`200xf980,
- X`20`20`20`200x03ff,`200xffff,`200xffff,`200xffc0,`200x03ff,`200xff00,`200x00ff
- V,`200xffc0,
- X`20`20`20`200x1fff,`200xff08,`200x1f80,`200x01f8,`200x03ff,`200xc003,`200xffc0
- V,`200x3ffc,
- X
- X`20`20`20`200x011f,`200xffff,`200xffff,`200xff80,`200x01ff,`200xffff,`200xffff
- V,`200xff80,
- X`20`20`20`200x01ff,`200xffff,`200xffff,`200xff80,`200x01ff,`200xffe0,`200x07ff
- V,`200xff80,
- X`20`20`20`200x1fff,`200xfe18,`200x1e03,`200xc078,`200x0b7e,`200x680b,`200x7e68
- V,`200x1ff8,
- X
- X`20`20`20`200x01ff,`200xffff,`200xffff,`200xff80,`200x00ff,`200xffff,`200xffff
- V,`200xdf00,
- X`20`20`20`200x01ff,`200xffff,`200xffff,`200xff80,`200x01ff,`200xffff,`200xffff
- V,`200xff80,
- X`20`20`20`200x3fff,`200xfc1c,`200x3801,`200xe01c,`200x15f9,`200xd415,`200xf9d4
- V,`200x1bd4,
- X
- X`20`20`20`200x00fb,`200xffff,`200xffff,`200xff00,`200x00ff,`200xffff,`200xffff
- V,`200xff00,
- X`20`20`20`200x00ff,`200xffff,`200xffff,`200xdf00,`200x00ff,`200xffff,`200xffff
- V,`200xdf00,
- X`20`20`20`200x3fff,`200xf83c,`200x3009,`200xf00c,`200x0aae,`200xa80a,`200xaea8
- V,`200x2e2a,
- X
- X`20`20`20`200x00ff,`200xffff,`200xffff,`200xff00,`200x007f,`200xffff,`200xffff
- V,`200xbe00,
- X`20`20`20`200x00ff,`200xffff,`200xffff,`200xff00,`200x00ff,`200xffff,`200xffff
- V,`200xff00,
- X`20`20`20`200x3fff,`200xf03c,`200x200c,`200xf004,`200x0155,`200x4001,`200x5540
- V,`200x17d4,
- X
- X`20`20`20`200x007f,`200xffff,`200xffff,`200xbe00,`200x003f,`200xffff,`200xffff
- V,`200x7c00,
- X`20`20`20`200x007f,`200xffff,`200xffff,`200xbe00,`200x007f,`200xffff,`200xffff
- V,`200xbe00,
- X`20`20`20`200x3fff,`200xf03c,`200x200f,`200xf004,`200x3e1f,`200x0f87,`200xc000
- V,`200x0000,
- X
- X`20`20`20`200x003f,`200xffff,`200xffff,`200x7c00,`200x001f,`200xffff,`200xfff8
- V,`200xf800,
- X`20`20`20`200x003f,`200xffff,`200xffff,`200x7c00,`200x003f,`200xffff,`200xffff
- V,`200x7c00,
- X`20`20`20`200x3fff,`200xf83c,`200x300f,`200xf00c,`200x7f3f,`200x9fcf,`200xe000
- V,`200x03c0,
- X
- X`20`20`20`200x001f,`200xffff,`200xfff8,`200xf800,`200x000f,`200xffff,`200xffe1
- V,`200xf000,
- X`20`20`20`200x001f,`200xffff,`200xfff8,`200xf800,`200x001f,`200xffff,`200xfff8
- V,`200xf800,
- X`20`20`20`200x3fff,`200xfc1c,`200x3807,`200xe01c,`200xffff,`200xfffe,`200xf000
- V,`200x0df0,
- X
- X`20`20`20`200x000f,`200xffff,`200xffe1,`200xf000,`200x0003,`200xffff,`200xff07
- V,`200xa000,
- X`20`20`20`200x000f,`200xffff,`200xffe1,`200xf000,`200x000f,`200xffff,`200xffe1
- V,`200xf000,
- X`20`20`20`200x1fff,`200xfe18,`200x1e03,`200xc078,`200x3fff,`200x3ff8,`200x3000
- V,`200x13f8,
- X
- X`20`20`20`200x0003,`200xffff,`200xff07,`200xa000,`200x0007,`200xffff,`200xf00e
- V,`200x4000,
- X`20`20`20`200x0003,`200xffff,`200xff07,`200xa000,`200x0003,`200xffff,`200xff07
- V,`200xa000,
- X`20`20`20`200x1fff,`200xff08,`200x1f80,`200x01f8,`200x8ffc,`200x7ff1,`200x1ad2
- V,`200x2ffc,
- X
- X`20`20`20`200x0007,`200xffff,`200xf00e,`200x4000,`200x00ab,`200xffff,`200xfc7d
- V,`200xff00,
- X`20`20`20`200x0007,`200xffff,`200xf00e,`200x4000,`200x0007,`200xffff,`200xf00e
- V,`200x4000,
- X`20`20`20`200x1fff,`200xff98,`200x1ff0,`200x0ff8,`200x3fff,`200x3ff8,`200x3000
- V,`200x381c,
- X
- X`20`20`20`200x00ab,`200xffff,`200xfc7d,`200xff00,`200x0155,`200xffff,`200xffe3
- V,`200xd540,
- X`20`20`20`200x00ab,`200xffff,`200xfc7d,`200xff00,`200x00ab,`200xffff,`200xfc7d
- V,`200xff00,
- X`20`20`20`200x0fff,`200xfff0,`200x0fff,`200xfff0,`200xffff,`200xfffe,`200xf000
- V,`200x6186,
- X
- X`20`20`20`200x0155,`200xffff,`200xffe3,`200xd540,`200x02aa,`200xff7f,`200xffcf
- V,`200xaaa0,
- X`20`20`20`200x0155,`200xffff,`200xffe3,`200xd540,`200x0155,`200xffff,`200xffe3
- V,`200xd540,
- X`20`20`20`200x0fff,`200xfff0,`200x0fff,`200xfff0,`200x7f3f,`200x9fcf,`200xe000
- V,`200x42c2,
- X
- X`20`20`20`200x02aa,`200xff7f,`200xffcf,`200xaaa0,`200x0555,`200x5f3f,`200xfc7f
- V,`200x5550,
- X`20`20`20`200x02aa,`200xff7f,`200xffcf,`200xaaa0,`200x02aa,`200xff7f,`200xffcf
- V,`200xaaa0,
- X`20`20`20`200x07ff,`200xff60,`200x07ff,`200xff60,`200x3e1f,`200x0f87,`200xc000
- V,`200x43c2,
- X
- X`20`20`20`200x0555,`200x5f3f,`200xfc7f,`200x5550,`200x0aaa,`200xaff3,`200xcffe
- V,`200xaaa0,
- X`20`20`20`200x0555,`200x5f3f,`200xfc7f,`200x5550,`200x0555,`200x5f3f,`200xfc7f
- V,`200x5550,
- X`20`20`20`200x03ff,`200xfcc0,`200x03ff,`200xfcc0,`200x30c3,`200x0c49,`200x2000
- V,`200x6186,
- X
- X`20`20`20`200x0aaa,`200xaff3,`200xcffe,`200xaaa0,`200x0555,`200x57f8,`200x1ff5
- V,`200x5540,
- X`20`20`20`200x0aaa,`200xaff3,`200xcffe,`200xaaa0,`200x0aaa,`200xaff3,`200xcffe
- V,`200xaaa0,
- X`20`20`20`200x07ff,`200xff68,`200x07ff,`200xff68,`200x79e7,`200x9e33,`200xd000
- V,`200x381c,
- X
- X`20`20`20`200x0555,`200x57f8,`200x1ff5,`200x5540,`200x02aa,`200xaaff,`200xffaa
- V,`200xaa80,
- X`20`20`20`200x0555,`200x57f8,`200x1ff5,`200x5540,`200x0555,`200x57f8,`200x1ff5
- V,`200x5540,
- X`20`20`20`200x15ff,`200xf9d4,`200x15ff,`200xf9d4,`200x3fcf,`200xf349,`200x2000
- V,`200x3ffc,
- X
- X`20`20`20`200x02aa,`200xaaff,`200xffaa,`200xaa80,`200x0055,`200x555f,`200xf555
- V,`200x5500,
- X`20`20`20`200x02aa,`200xaaff,`200xffaa,`200xaa80,`200x02aa,`200xaaff,`200xffaa
- V,`200xaa80,
- X`20`20`20`200x2adf,`200xe3aa,`200x2adf,`200xe3aa,`200x3fcf,`200xf366,`200x6600
- V,`200x1ff8,
- X
- X`20`20`20`200x0055,`200x555f,`200xf555,`200x5500,`200x000a,`200xaaaa,`200xaaaa
- V,`200xa000,
- X`20`20`20`200x0055,`200x555f,`200xf555,`200x5500,`200x0055,`200x555f,`200xf555
- V,`200x5500,
- X`20`20`20`200x157c,`200x3f54,`200x157c,`200x3f54,`200x79e7,`200x9e3c,`200xf900
- V,`200x13d4,
- X
- X`20`20`20`200x000a,`200xaaaa,`200xaaaa,`200xa000,`200x0000,`200x0555,`200x5550
- V,`200x0000,
- X`20`20`20`200x000a,`200xaaaa,`200xaaaa,`200xa000,`200x000a,`200xaaaa,`200xaaaa
- V,`200xa000,
- X`20`20`20`200x0aaf,`200xfaa8,`200x0aaf,`200xfaa8,`200x30c3,`200x0c3c,`200xf900
- V,`200x2a2a,
- X
- X`20`20`20`200x0000,`200x0555,`200x5550,`200x0000,`200x0000,`200x0000,`200x0000
- V,`200x0000,
- X`20`20`20`200x0000,`200x0555,`200x5550,`200x0000,`200x0000,`200x0555,`200x5550
- V,`200x0000,
- X`20`20`20`200x0155,`200x5540,`200x0155,`200x5540,`200x0000,`200x0066,`200x6600
- V,`200x1554
- X`7D;
- X
- Xstatic`20RelativeTokens`09relativeTokens`20=`20`7B
- X`09`7B`20REAR,`09FRONT,`20RIGHT,`20LEFT`20`7D,`09/*`20me`20north,`20him`20`5Bn
- V,`20s,`20e,`20w`5D`20*/
- X`09`7B`20FRONT,`20REAR,`20LEFT,`20RIGHT`20`7D,`09/*`20me`20south,`20him`20`5Bn
- V,`20s,`20e,`20w`5D`20*/
- X`09`7B`20LEFT,`20RIGHT,`20REAR,`20FRONT`20`7D,`09/*`20me`20east`20...`20*/
- X`09`7B`20RIGHT,`20LEFT,`20FRONT,`20REAR`20`7D`09/*`20me`20west`20...`20*/
- X`7D;
- X
- X/*`20
- X`20*`20Initialize`20the`20display`20manager.
- X`20*/
- X
- XInitDisplay(argc,`20argv)
- Xchar`20**argv;
- X`7B
- X`09register`20int`09i;
- X`09register`20RatState`09*rsp;
- X
- X`09for`20(i`20=`200;`20i`20<`20MAXRATS;`20i++)`20`7B
- X`09`09rsp`20=`20`26clearArray`5Bi`5D;
- X`09`09rsp->playing`20=`20FALSE;
- X`09`09rsp->x`20=`201;
- X`09`09rsp->y`20=`201;
- X`09`09rsp->dir`20=`20NORTH;
- X`09`7D
- X
- X`09InitWindow(argc,`20argv);
- X`7D
- X
- X/*
- X`20*`20all`20in`20the`20name`20of`20portability...`20actually`20put`20the`20di
- Vsplay`20on
- X`20*`20the`20screen.`20Some`20window`20systems`20need`20to`20do`20initializati
- Von`20before
- X`20*`20the`20net`20is`20started,`20but`20don't`20want`20to`20display`20until
- V`20after.
- X`20*/
- X
- XStartDisplay()
- X`7B
- X`09StartWindow(ratBits,`20ratBits_width,`20ratBits_height);
- X`7D
- X
- X/*`20
- X`20*`20Manage`20the`20top`20portion`20of`20the`20screen,`20the`20perspective
- V`20view`20of`20the
- X`20*`20maze,`20with`20the`20eyeballs.`20What`20is`20seen`20is`20controlled`20b
- Vy`20the`20position
- X`20*`20in`20the`20maze`20and`20what`20players`20are`20visible.`20This`20latter
- V`20is`20recorded
- X`20*`20in`20the`20R2d2`20array`20(the`20significance`20of`20the`20name`20is
- V`20lost`20to
- X`20*`20history),`20which`20is`20recomputed`20every`20time`20someone`20moves.
- X`20*
- X`20*`20The`20perspective`20view`20is`20calculated`20on`20the`20fly`20from`20th
- Ve`20viewTable`20array.
- X`20*`20viewTable`20contains`20a`20set`20of`2012`20line`20segments`20for`2030
- V`20views.`20The`20longest
- X`20*`20corridor`20is`2030`20spaces,`20and`20for`20each`20cell`20in`20the`20maz
- Ve,`20there`20are`2012
- X`20*`20distinct`20lines`20(wall`20edges)`20that`20could`20be`20visible`20(neve
- Vr`20all`20at`20once).
- X`20*
- X`20*`20Each`20time,`20march`20down`20the`20hall`20in`20the`20direction`20faced
- V`20and`20figure
- X`20*`20out`20which`20lines`20to`20actually`20draw.`20Then`20look`20in`20R2d2
- V`20and`20draw`20in`20opponents.
- X`20*/
- X
- X#define`09NDIR`09NDIRECTION
- Xstatic`20Boolean`09prevEdge3,`20prevEdge7;`09/*`20plotter`20smarts`20*/
- Xstatic`20Boolean`09edge1,`20edge2,`20edge3,`20edge4,`20edge5,`20edge6,`20edge7
- V;
- Xstatic`20XYpair`09edge3Lines`5B2`5D,`20edge7Lines`5B2`5D;
- Xstatic`20XY`09l1Delta`5BNDIR`5D`20=`20`7B`20`7B0,`20-1`7D,`20`7B0,`201`7D,`20
- V`7B1,`200`7D,`20`7B-1,`200`7D`20`7D;
- Xstatic`20XY`09l2Delta`5BNDIR`5D`20=`20`7B`20`7B1,`20-1`7D,`20`7B-1,`201`7D,
- V`20`7B1,`201`7D,`20`7B-1,`20-1`7D`20`7D;
- Xstatic`20XY`09c2Delta`5BNDIR`5D`20=`20`7B`20`7B1,`200`7D,`20`7B-1,`200`7D,`20
- V`7B0,`201`7D,`20`7B0,`20-1`7D`20`7D;
- Xstatic`20XY`09r1Delta`5BNDIR`5D`20=`20`7B`20`7B0,`201`7D,`20`7B0,`20-1`7D,`20
- V`7B-1,`200`7D,`20`7B1,`200`7D`20`7D;
- Xstatic`20XY`09r2Delta`5BNDIR`5D`20=`20`7B`20`7B1,`201`7D,`20`7B-1,`20-1`7D,
- V`20`7B-1,`201`7D,`20`7B1,`20-1`7D`20`7D;
- X#undef`09NDIR
- X
- XShowView(x,`20y,`20dir)
- Xint`09`09x,`20y;
- XDirection`09dir;
- X`7B
- X`09register`20XYpair`09`09*tp`20=`20viewTable;
- X`09register`20int`09`09tx`20=`20x;
- X`09register`20int`09`09ty`20=`20y;
- X`09RatId`09`09`09ratId;
- X`09RatLook`09`09`09ratLook;
- X`09Boolean`09`09`09oldVisible;
- X`09XYpair`09`09`09*hidden(),`20*plotLine();
- X
- X`09ClearView();
- X`09prevEdge3`20=`20prevEdge7`20=`20FALSE;
- X`09while`20(!M.maze`5Btx`5D.y`5Bty`5D)`20`7B
- X`09`09tp`20=`20hidden(tx,`20ty,`20dir,`20tp);`09/*`20draw`20a`20cell`20*/
- X`09`09switch`20(dir)`20`7B
- X`09`09case`20NORTH:`09tx++;`20break;
- X`09`09case`20SOUTH:`09tx--;`20break;
- X`09`09case`20EAST:`09ty++;`20break;
- X`09`09case`20WEST:`09ty--;`20break;
- X`09`09`7D
- X`09`7D
- X`09if`20(prevEdge3)
- X`09`09(void)`20plotLine(edge3Lines,`20TRUE);
- X`09if`20(prevEdge7)
- X`09`09(void)`20plotLine(edge7Lines,`20TRUE);
- X
- X`09/*`20show`20the`20tokens`20*/
- X
- X`09for`20(ratId`20=`200;`20ratId`20<`20MAXRATS;`20ratId++)`20`7B
- X`09`09if`20(ratId`20==`20M.myRatId)
- X`09`09`09continue;
- X`09`09ratLook`20=`20`26R2d2`5BratId`5D;
- X`09`09oldVisible`20=`20ratLook->visible;
- X`09`09TokenVisible(ratId);
- X`09`09if`20(ratLook->visible`20==`20TRUE)
- X`09`09`09XORToken(ratId);
- X`09`09if`20(ratLook->visible`20!=`20oldVisible)
- X`09`09`09UpdateScoreCard(ratId);
- X`09`7D
- X`7D
- X
- XXYpair`09*
- XplotLine(p,`20two)
- XXYpair`09*p;
- XBoolean`09two;
- X`7B
- X`09while`20(1)`20`7B
- X`09`09DrawViewLine(p->p1.x,`20p->p1.y,`20p->p2.x,`20p->p2.y);
- X`09`09p++;
- X`09`09if`20(!two)
- X`09`09`09return`20p;
- X`09`09two`20=`20FALSE;
- X`09`7D
- X`7D
- X
- XXYpair`20*
- Xhidden(x,`20y,`20dir,`20p)
- Xint`09`09x,`20y;
- XDirection`09dir;
- XXYpair`09`09*p;
- X`7B
- X`09int`09l1x,`20l1y,`20l2x,`20l2y;
- X`09int`09r1x,`20r1y,`20r2x,`20r2y;
- X`09int`09c2x,`20c2y;
- X
- X`09/*`20first`20calculate`20the`20coordinates`20of`20the`20neighboring`20cubes
- V`20*/
- X
- X`09l1x`20=`20x`20+`20l1Delta`5Bdir`5D.xcor;`09/*`20find`20left`20cube`20*/
- X`09l1y`20=`20y`20+`20l1Delta`5Bdir`5D.ycor;
- X`09l2x`20=`20x`20+`20l2Delta`5Bdir`5D.xcor;`09/*`20find`20left`20forward`20cub
- Ve`20*/
- X`09l2y`20=`20y`20+`20l2Delta`5Bdir`5D.ycor;
- X`09r1x`20=`20x`20+`20r1Delta`5Bdir`5D.xcor;`09/*`20find`20right`20cube`20*/
- X`09r1y`20=`20y`20+`20r1Delta`5Bdir`5D.ycor;
- X`09r2x`20=`20x`20+`20r2Delta`5Bdir`5D.xcor;`09/*`20find`20right`20forward`20cu
- Vbe`20*/
- X`09r2y`20=`20y`20+`20r2Delta`5Bdir`5D.ycor;
- X`09c2x`20=`20x`20+`20c2Delta`5Bdir`5D.xcor;`09/*`20find`20forward`20cube`20*/
- X`09c2y`20=`20y`20+`20c2Delta`5Bdir`5D.ycor;
- X
- X`09/*`20next`20calculate`20which`20of`20the`207`20possible`20cube`20edges`20ar
- Ve`20visible`20*/
- X
- X`09edge2`20=`20M.maze`5Bc2x`5D.y`5Bc2y`5D;`09/*`20c2`20*/
- X`09edge3`20=`20M.maze`5Bl1x`5D.y`5Bl1y`5D;`09/*`20l1`20*/
- X`09edge4`20=`20!edge3;`09`09`09/*`20!l1`20*/
- X
- X`09edge7`20=`20M.maze`5Br1x`5D.y`5Br1y`5D;`09/*`20r1`20*/
- X`09edge6`20=`20!edge7;`09`09`09/*`20!r1`20*/
- X
- X`09edge1`20=`20edge3`20`26`26`20(edge2`20`7C`7C`20!M.maze`5Bl2x`5D.y`5Bl2y`5D)
- V
- X`09`09`7C`7C`20((!edge2)`20`26`26`20edge4);
- X`09edge5`20=`20edge7`20`26`26`20(edge2`20`7C`7C`20!M.maze`5Br2x`5D.y`5Br2y`5D)
- V
- X`09`09`7C`7C`20((!edge2)`20`26`26`20edge6);
- X
- X`09/*`20
- X`09`20*`20Should`20be`20matching`20the`20following:
- X`09`20*`09x1`20=`20l1`20(c2`20+`20!l2)`20+`20!c2`20!l1
- X`09`20*`09x2`20=`20c2
- X`09`20*`09x3`20=`20l1
- X`09`20*`09x4`20=`20!l1
- X`09`20*`09x5`20=`20r1`20(c2`20+`20!r2)`20+`20!c2`20!r1
- X`09`20*`09x6`20=`20!r1
- X`09`20*`09x7`20=`20r1
- X`09`20*/
- X
- X`09if`20(edge1)
- X`09`09p`20=`20plotLine(p,`20FALSE);
- X`09else
- X`09`09p++;
- X`09if`20(edge2)
- X`09`09p`20=`20plotLine(p,`20TRUE);
- X`09else
- X`09`09p`20+=`202;
- X`09if`20(edge3)`20`7B
- X`09`09if`20(prevEdge3)`20`7B
- X`09`09`09edge3Lines`5B0`5D.p2`20=`20(p++)->p2;
- X`09`09`09edge3Lines`5B1`5D.p2`20=`20p->p2;
- X`09`09`7D`20else`20`7B
- X`09`09`09edge3Lines`5B0`5D`20=`20*p++;
- X`09`09`09edge3Lines`5B1`5D`20=`20*p;
- X`09`09`09prevEdge3`20=`20TRUE;
- X`09`09`7D
- X`09`09p++;
- X`09`7D`20else`20`7B
- X`09`09if`20(prevEdge3)`20`7B
- X`09`09`09(void)`20plotLine(edge3Lines,`20TRUE);
- X`09`09`09prevEdge3`20=`20FALSE;
- X`09`09`7D
- X`09`09p`20+=`202;
- X`09`7D
- X`09if`20(edge4)
- X`09`09p`20=`20plotLine(p,`20TRUE);
- X`09else
- X`09`09p`20+=`202;
- X`09if`20(edge5)
- X`09`09p`20=`20plotLine(p,`20FALSE);
- X`09else
- X`09`09p++;
- X`09if`20(edge6)
- X`09`09p`20=`20plotLine(p,`20TRUE);
- X`09else
- X`09`09p`20+=`202;
- X`09if`20(edge7)`20`7B
- X`09`09if`20(prevEdge7)`20`7B
- X`09`09`09edge7Lines`5B0`5D.p1`20=`20(p++)->p1;
- X`09`09`09edge7Lines`5B1`5D.p1`20=`20p->p1;
- X`09`09`7D`20else`20`7B
- X`09`09`09edge7Lines`5B0`5D`20=`20*p++;
- X`09`09`09edge7Lines`5B1`5D`20=`20*p;
- X`09`09`09prevEdge7`20=`20TRUE;
- X`09`09`7D
- X`09`09p++;
- X`09`7D`20else`20`7B
- X`09`09if`20(prevEdge7)`20`7B
- X`09`09`09(void)`20plotLine(edge7Lines,`20TRUE);
- X`09`09`09prevEdge7`20=`20FALSE;
- X`09`09`7D
- X`09`09p`20+=`202;
- X`09`7D
- X`09return`20p;
- X`7D
- X
- X/*
- X`20*`20sets`20R2d2`5BhisRatId`5D`20variables
- X`20*`20uses`20M.ratcb`5BhisRatId`5D`20as`20input`20for`20his`20position`20and
- V`20direction
- X`20*/
- X
- XTokenVisible(hisRatId)
- XRatId`09hisRatId;
- X`7B
- X`09RatLook`09`09ratLook`20=`20`26R2d2`5BhisRatId`5D;
- X`09RatInfo`09`09ratInfo`20=`20`26M.ratcb.rats`5BhisRatId`5D;
- X`09Loc`09`09tx,`20ty;
- X`09Direction`09td;
- X`09int`09`09ix,`20ix12;
- X
- X`09ratLook->visible`20=`20FALSE;
- X`09if`20(!ratInfo->playing)
- X`09`09return;
- X`09if`20(M.peeking)`20`7B
- X`09`09tx`20=`20M.xPeek;
- X`09`09ty`20=`20M.yPeek;
- X`09`09td`20=`20M.dirPeek;
- X`09`7D`20else`20`7B
- X`09`09tx`20=`20M.xloc;
- X`09`09ty`20=`20M.yloc;
- X`09`09td`20=`20M.dir;
- X`09`7D
- X`09ix`20=`200;
- X`09while`20(!M.maze`5Btx`5D.y`5Bty`5D)`20`7B
- X`09`09switch(td)`20`7B
- X`09`09case`20NORTH:`09tx++;`20break;
- X`09`09case`20SOUTH:`09tx--;`20break;
- X`09`09case`20EAST:`09ty++;`20break;
- X`09`09case`20WEST:`09ty--;`20break;
- X`09`09`7D
- X`09`09ix++;
- X`09`09if`20((tx`20==`20ratInfo->xLoc)`20`26`26`20(ty`20==`20ratInfo->yLoc))
- V`20`7B
- X`09`09`09ratLook->visible`20=`20TRUE;
- X`09`09`09ix12`20=`20ix`20*`2012;
- X`09`09`09ratLook->x`20=`20(viewTable`5Bix12+3`5D.p2.x`20+
- X`09`09`09`09`20`20`20`20`20viewTable`5Bix12+10`5D.p1.x)/2;
- X`09`09`09ratLook->y`20=`20(viewTable`5Bix12+3`5D.p1.y`20+
- X`09`09`09`09`20`20`20`20`20viewTable`5Bix12+3`5D.p2.y)/2;
- X`09`09`09ratLook->tokenId`20=`20relativeTokens`5Btd`5D.t`5BratInfo->dir`5D;
- X`09`09`09ratLook->distance`20=`20ix;
- X`09`09`09break;
- X`09`09`7D
- X`09`7D
- X`7D
- X
- X/*`20
- X`20*`20draw`20him`20into`20the`20maze,`20with`20the`20right`20size`20for`20his
- V`20distance`20away
- X`20*`20and`20facing`20the`20right`20way.
- X`20*/
- X
- XXORToken(hisRatId)
- XRatId`09hisRatId;
- X`7B
- X`09int`09size;
- X`09int`09srcX,`20srcY;
- X
- X`09getRat(hisRatId,`20`26srcX,`20`26srcY,`20`26size);
- X`09DisplayRatBitmap(R2d2`5BhisRatId`5D.x`20-`20size/2,
- X`09`09`09R2d2`5BhisRatId`5D.y`20`20-`20size/2,
- X`09`09`09size,`20size,`20srcX,`20srcY);
- X`7D
- X
- X/*`20
- X`20*`20Dig`20the`20appropriate`20bitmap`20out`20of`20the`20master`20bitmap,
- V`20which`20has`20all
- X`20*`20possible`20views`20neatly`20packed`20into`20place.
- X`20*/
- X
- XgetRat(hisRatId,`20x,`20y,`20size)
- XRatId`09hisRatId;
- Xint`09*x,`20*y,`20*size;
- X`7B
- X`09int`09viewT`20=`20LEFT;
- X`09int`09view`20=`20R2d2`5BhisRatId`5D.tokenId;
- X
- X`09switch`20(R2d2`5BhisRatId`5D.distance)`20`7B
- X`09`09case`201:
- X`09`09`09*size`20=`2064;
- X`09`09`09*x`20=`200;
- X`09`09`09*y`20=`200;
- X`09`09`09for`20(viewT`20=`200;`20viewT`20!=`20view;`20*x`20+=`2064)
- X`09`09`09`09viewT++;
- X`09`09`09return;
- X
- X`09`09case`202:
- X`09`09`09*size`20=`2032;
- X`09`09`09for`20(*x`20=`204*64;`20*x`20!=`2064*5;`20*x`20+=`2032)
- X`09`09`09`09for`20(*y`20=`200;`20*y`20!=`2064;`20*y`20+=`2032)
- X`09`09`09`09`09if`20(viewT`20==`20view)
- X`09`09`09`09`09`09return;
- X`09`09`09`09`09else
- X`09`09`09`09`09`09viewT++;
- X
- X`09`09case`203:
- X`09`09`09*size`20=`2024;
- X`09`09`09for`20(*x`20=`205*64;`20*x`20!=`2064*5+48;`20*x`20+=`2024)
- X`09`09`09`09for`20(*y`20=`200;`20*y`20!=`2048;`20*y`20+=`2024)
- X`09`09`09`09`09if`20(viewT`20==`20view)
- X`09`09`09`09`09`09return;
- X`09`09`09`09`09else
- X`09`09`09`09`09`09viewT++;
- X
- X`09`09case`204:
- X`09`09case`205:
- X`09`09`09*size`20=`2016;
- X`09`09`09*x`20=`2064*5+48;
- X`09`09`09for`20(*y`20=`200;`20*y`20!=`2064;`20*y`20+=`2016)
- X`09`09`09`09if`20(viewT`20==`20view)
- X`09`09`09`09`09return;
- X`09`09`09`09else
- X`09`09`09`09`09viewT++;
- X
- X`09`09case`206:
- X`09`09case`207:
- X`09`09case`208:
- X`09`09`09*size`20=`209;
- X`09`09`09*y`20=`2048;
- X`09`09`09for`20(*x`20=`2064*5;`20*x`20!=`2064*5`20+`204*9;`20*x`20+=`209)
- X`09`09`09`09if`20(viewT`20==`20view)
- X`09`09`09`09`09return;
- X`09`09`09`09else
- X`09`09`09`09`09viewT++;
- X
- X`09`09case`209:
- X`09`09case`2010:
- X`09`09case`2011:
- X`09`09case`2012:
- X`09`09`09*size`20=`206;
- X`09`09`09*y`20=`2048+9;
- X`09`09`09for`20(*x`20=`2064*5;`20*x`20!=`2064*5`20+`204*6;`20*x`20+=`206)
- X`09`09`09`09if`20(viewT`20==`20view)
- X`09`09`09`09`09return;
- X`09`09`09`09else
- X`09`09`09`09`09viewT++;
- X
- X`09`09case`2013:
- X`09`09case`2014:
- X`09`09case`2015:
- X`09`09case`2016:
- X`09`09case`2017:
- X`09`09case`2018:
- X`09`09`09*size`20=`204;
- X`09`09`09*y`20=`2048+9+3;
- X`09`09`09for`20(*x`20=`2064*5`20+`204*6;`20*x`20!=`2064*5`20+4*6`20+`204*4;
- V`20*x`20+=`204)
- X`09`09`09`09if`20(viewT`20==`20view)
- X`09`09`09`09`09return;
- X`09`09`09`09else
- X`09`09`09`09`09viewT++;
- X
- X`09`09default:
- X`09`09`09*size`20=`203;
- X`09`09`09*y`20=`2048+9;
- X`09`09`09for`20(*x`20=`2064*5`20+`204*6;`20*x`20!=`2064*5`20+`204*6`20+`204*3;
- V`20*x`20+=`203)
- X`09`09`09`09if`20(viewT`20==`20view)
- X`09`09`09`09`09return;
- X`09`09`09`09else
- X`09`09`09`09`09viewT++;
- X`09`7D
- X`7D
- X
- X/*`20
- X`20*`20The`20maze`20display.`20This`20is`20controlled`20by`20the`20clearArray
- V`20(another
- X`20*`20historically`20significant`20name,`20I'm`20afraid).`20Each`20player`20h
- Vas`20his
- X`20*`20loaction`20and`20playing`20information`20stored`20here`20as`20well`20as
- V`20in`20M.ratcb.
- X`20*`20This`20is`20to`20tell`20who`20was`20playing`20before`20the`20last`20upd
- Vate/status/location
- X`20*`20packet`20came`20in,`20so`20we`20can`20do`20the`20right`20thing`20for
- V`20adding/deleting`20players.
- X`20*
- X`20*`20There`20are`20various`20hooks`20for`20setting`20the`20contents`20of`20c
- VlearArray
- X`20*`20from`20the`20outside,`20like`20SetMyRatId().
- X`20*/
- X
- XSetMyRatId(ratId)
- XRatId`09ratId;
- X`7B
- X`09clearArray`5BratId`5D.playing`20=`20TRUE;
- X`7D
- X
- X/*`20
- X`20*`20Someone`20joined`20us;`20add`20him`20to`20the`20display.
- X`20*/
- X
- XAddNewPlayer(ratId,`20xloc,`20yloc,`20dir)
- XRatId`09ratId;
- XDirection`20dir;
- X`7B
- X`09clearArray`5BratId`5D.playing`20=`20TRUE;
- X`09clearArray`5BratId`5D.x`20=`20xloc;
- X`09clearArray`5BratId`5D.y`20=`20yloc;
- X`09clearArray`5BratId`5D.dir`20=`20dir;
- X`09DisplayOthersPosition(ratId,`20xloc,`20yloc,`20dir);
- X`09NotifyPlayer();
- X`7D
- X
- X/*
- X`20*`20Someone`20left.
- X`20*/
- XExitPlayer(ratId)
- XRatId`09ratId;
- X`7B
- X`09clearPosition(ratId,`20clearArray`5BratId`5D.x,`20clearArray`5BratId`5D.y);
- V
- X`09clearArray`5BratId`5D.playing`20=`20FALSE;
- X`7D
- X
- X/*`20
- X`20*`20Tell`20the`20display`20controller`20I`20moved.
- X`20*/
- X
- XShowPosition(xloc,`20yloc,`20invincible,`20tdir)
- Xint`09`09xloc,`20yloc;
- XBoolean`09`09invincible;
- XDirection`09tdir;
- X`7B
- X`09clearPosition(M.myRatId,`20clearArray`5BM.myRatId`5D.x,
- X`09`09clearArray`5BM.myRatId`5D.y);
- X`09showMe(xloc,`20yloc,`20invincible,`20tdir);
- X`7D
- X
- X/*`20
- X`20*`20Show`20where`20everybody`20is`20(only`20for`20wizards).
- X`20*/
- X
- XShowAllPositions()
- X`7B
- X`09RatId`09ratId;
- X
- X`09for`20(ratId`20=`200;`20ratId`20<`20MAXRATS;`20ratId++)`20`7B
- X`09`09if`20(ratId`20==`20M.myRatId)
- X`09`09`09continue;
- X`09`09if`20(clearArray`5BratId`5D.playing`20`26`26`20!M.ratcb.rats`5BratId`5D.
- Vplaying)
- X`09`09`09ExitPlayer(ratId);
- X`09`09else`20if`20(!clearArray`5BratId`5D.playing`20`26`26
- X`09`09`09`20M.ratcb.rats`5BratId`5D.playing)
- X`09`09`09AddNewPlayer(ratId,`20M.ratcb.rats`5BratId`5D.xLoc,
- X`09`09`09`09`09`20`20`20`20M.ratcb.rats`5BratId`5D.yLoc,
- X`09`09`09`09`09`20`20`20`20M.ratcb.rats`5BratId`5D.dir);
- X`09`09else`20if`20(clearArray`5BratId`5D.playing)
- X`09`09`09DisplayOthersPosition(ratId,`20M.ratcb.rats`5BratId`5D.xLoc,
- X`09`09`09`09`09`09`20`20`20`20`20M.ratcb.rats`5BratId`5D.yLoc,
- X`09`09`09`09`09`09`20`20`20`20`20M.ratcb.rats`5BratId`5D.dir);
- X`09`7D
- X`7D
- X
- X/*`20
- X`20*`20Someone`20else`20moved;`20update`20his`20info`20and`20display`20the`20n
- Vew`20position.
- X`20*`20Again,`20only`20for`20wizards`20who`20are`20exercising`20their`20powers
- V.
- X`20*/
- X
- XDisplayOthersPosition(ratId,`20xloc,`20yloc,`20dir)
- XRatId`09ratId;
- XDirection`20dir;
- X`7B
- X`09if`20(!clearArray`5BratId`5D.playing`20`26`26`20M.ratcb.rats`5BratId`5D.pla
- Vying)`20`7B
- X`09`09AddNewPlayer(ratId,`20xloc,`20yloc,`20dir);`09/*`20calls`20me`20back`20*
- V/
- X`09`09return;
- X`09`7D
- X`09`09
- X`09clearPosition(ratId,`20clearArray`5BratId`5D.x,`20clearArray`5BratId`5D.y);
- V
- X`09if`20(clearArray`5BratId`5D.playing`20`26`26`20M.omniscient)
- X`09`09showOther(ratId,`20xloc,`20yloc,`20dir);
- X`7D
- X
- X/*`20
- X`20*`20Do`20the`20actual`20work`20of`20showing`20me,`20with`20the`20right`20so
- Vrt`20of`20arrow`20(in
- X`20*`20case`20I'm`20playing`20wizard).
- X`20*/
- X
- XshowMe(xloc,`20yloc,`20invincible,`20dir)
- Xint`09`09xloc,`20yloc;
- XBoolean`09`09invincible;
- XDirection`09dir;
- X`7B
- X`09register`20BitCell`09*bp;
- X`09register`20RatState`09*rsp;
- X
- X`09if`20(invincible)
- X`09`09bp`20=`20invincibleArrows;
- X`09else
- X`09`09bp`20=`20normalArrows;
- X
- X`09HackMazeBitmap(xloc,`20yloc,`20`26bp`5Bdir`5D);
- X
- X`09rsp`20=`20`26clearArray`5BM.myRatId`5D;
- X`09rsp->playing`20=`20TRUE;
- X`09rsp->x`20=`20xloc;
- X`09rsp->y`20=`20yloc;
- X`09rsp->dir`20=`20dir;
- X`09M.invincible`20=`20invincible;
- X`7D
- X
- X/*`20
- X`20*`20Bang`20the`20bits`20to`20show`20the`20other`20guy.
- X`20*/
- X
- XshowOther(ratId,`20xloc,`20yloc,`20dir)
- XDirection`20dir;
- X`7B
- X`09register`20int`09`09i;
- X`09register`20RatState`09*rsp;
- X`09BitCell`09`09`09bits;
- X
- X`09for`20(i`20=`200;`20i`20<`2016;`20i++)
- X`09`09bits.bits`5Bi`5D`20=`20otherArrows`5Bdir`5D.bits`5Bi`5D`20`7C
- X`09`09`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20numbers`5BratId`5D.bits`5Bi
- V`5D;`20
- X
- X`09HackMazeBitmap(xloc,`20yloc,`20`26bits);
- X
- X`09rsp`20=`20`26clearArray`5BratId`5D;
- X`09rsp->playing`20=`20TRUE;
- X`09rsp->x`20=`20xloc;
- X`09rsp->y`20=`20yloc;
- X`09rsp->dir`20=`20dir;
- X`7D
- X
- X/*`20
- X`20*`20When`20someone`20moves`20off`20a`20position,`20clear`20it`20out.`20If
- V`20there's`20someone
- X`20*`20"under"`20him,`20display`20the`20second`20guy.`20
- X`20*/
- X
- XclearPosition(ratId,`20xClear,`20yClear)
- XRatId`09ratId;
- X`7B
- X`09register`20RatState`09*rsp;
- X`09register`20int`09`09i;
- X`09
- X`09clearSquare(xClear,`20yClear);
- X`09for`20(i`20=`200;`20i`20<`20MAXRATS;`20i++)`20`7B
- X`09`09rsp`20=`20`26clearArray`5Bi`5D;
- X`09`09if`20((i`20==`20ratId)`20`7C`7C`20!(rsp->playing))
- X`09`09`09continue;
- X`09`09if`20((rsp->x`20==`20xClear)`20`26`26`20(rsp->y`20==`20yClear))
- X`09`09`09if`20(i`20==`20M.myRatId)
- X`09`09`09`09showMe(rsp->x,`20rsp->y,`20M.invincible,`20rsp->dir);
- X`09`09`09else
- X`09`09`09`09if`20(M.omniscient)
- X`09`09`09`09`09showOther(i,`20rsp->x,`20rsp->y,`20rsp->dir);
- X`09`7D
- X`7D
- X
- Xstatic`20BitCell`20EMPTY`20=`20`7B0,`200,`200,`200,`200,`200,`200,`200,`200,
- V`200,`200,`200,`200,`200,`200,`200`7D;
- X
- X/*`20clear`20out`20a`20square`20of`20the`20maze`20*/
- XclearSquare(xClear,`20yClear)
- X`7B
- X`09HackMazeBitmap(xClear,`20yClear,`20`26EMPTY);
- X`7D
- X
- X/*`20
- X`20*`20Handle`20the`20score`20card`20area.`20Most`20of`20the`20work`20is`20don
- Ve`20in`20window`20system
- X`20*`20dependent`20routines.
- X`20*/
- X
- XNewScoreCard()
- X`7B
- X`09register`20RatId`09ratId;
- X
- X`09for(`20ratId`20=`200;`20ratId`20<`20MAXRATS;`20ratId++)
- X`09`09UpdateScoreCard(ratId);
- X`09if`20(M.omniscient)
- X`09`09ShowAllPositions();
- X`7D
- X
- XUpdateScoreCard(ratId)
- XRatId`09ratId;
- X`7B
- X`09ClearScoreLine(ratId);
- X`09if`20(M.ratcb.rats`5BratId`5D.playing)
- X`09`09WriteScoreString(ratId);
- X`09if`20(R2d2`5BratId`5D.visible`20==`20TRUE)
- X`09`09InvertScoreLine(ratId);
- X`7D
- X
- X/*
- X`20*`20Some`20window`20systems`20(notably`20X10)`20choose`20to`20represent`20b
- Vitmaps`20in
- X`20*`20little-endian`20order.`20That`20is,`20the`20least`20significant`20bit
- V`20in`20the`20word`20is
- X`20*`20the`20leftmost`20bit`20on`20the`20screen.`20This`20means`20that`20bitma
- Vps`20look
- X`20*`20"backwards"`20on`20the`20screen`20from`20the`20way`20they`20look`20in
- V`20source`20code.`20So,`20we
- X`20*`20flip`20them`20all`20here,`20once,`20at`20initialization`20time,`20so
- V`20they`20can`20be`20edited
- X`20*`20"by`20hand".
- X`20*
- X`20*`20It`20is`20up`20to`20the`20window`20system`20initialization`20code`20to
- V`20call`20this,`20if
- X`20*`20deemed`20necessary.
- X`20*
- X`20*`20Hack`20hack.
- X`20*/
- X
- XFlipBitmaps()
- X`7B
- X`09register`20i;
- X
- X`09bitFlip(normalArrows);
- X`09bitFlip(invincibleArrows);
- X`09bitFlip(otherArrows);
- X`09bitFlip(numbers);`09`09/*`20only`20gets`20the`20first`204`20*/
- X`09bitFlip(`26numbers`5B4`5D);`09`09/*`20get`20the`20rest`20*/
- X`09for`20(i`20=`200;`20i`20<`20ratBits_width`20*`20ratBits_height`20/`2016;
- V`20i`20+=`2064)
- X`09`09bitFlip((BitCell`20*)`20`26ratBits`5Bi`5D);
- X`7D
- X
- X/*
- X`20*`20quick`20bit`20flipper`20--`20divide`20and`20conquer`20due`20to`20Jeff
- V`20Mogul.
- X`20*`20unrolled`20to`20do`204`2016`20bit`20words,`20but`20generally`20extensib
- Vle.
- X`20*/
- X
- XbitFlip(bits)
- Xregister`20BitCell`20*bits;
- X`7B
- X`09register`20int`09num,`20top,`20bot,`20i,`20j;
- X
- X`09for`20(i`20=`200;`20i`20<`204;`20i++)`20`7B
- X`09`09for`20(j`20=`200;`20j`20<`2016;`20j++)`20`7B
- X`09`09`09num`20=`20bits->bits`5Bj`5D`20`26`200xffff;
- X`09`09`09top`20=`20num`20`26`200xff00;
- X`09`09`09bot`20=`20num`20`26`200x00ff;
- X`09`09`09top`20>>=`208;
- X`09`09`09bot`20<<=`208;
- X`09`09`09num`20=`20top`7Cbot;
- X
- X`09`09`09top`20=`20num`20`26`200xf0f0;
- X`09`09`09bot`20=`20num`20`26`200x0f0f;
- X`09`09`09top`20>>=`204;
- X`09`09`09bot`20<<=`204;
- X`09`09`09num`20=`20top`7Cbot;
- X
- X`09`09`09top`20=`20num`20`26`200xcccc;
- X`09`09`09bot`20=`20num`20`26`200x3333;
- X`09`09`09top`20>>=`202;
- X`09`09`09bot`20<<=`202;
- X`09`09`09num`20=`20top`7Cbot;
- X
- X`09`09`09top`20=`20num`20`26`200xaaaa;
- X`09`09`09bot`20=`20num`20`26`200x5555;
- X`09`09`09top`20>>=`201;
- X`09`09`09bot`20<<=`201;
- X`09`09`09bits->bits`5Bj`5D`20=`20top`7Cbot;
- X`09`09`7D
- X`09`09bits++;
- X`09`7D
- X`7D
- X
- X
- X/*
- X`20*`20Then`20there`20are`20the`20systems`20that`20are`20perfectly`20happy`20w
- Vith`20MSBFirst`20data,`20but
- X`20*`20byte`20swap`20the`20shorts`20that`20are`20used.`20`20We`20fix`20that
- V`20here.
- X`20*
- X`20*`20The`20htons()`20routine`20is`20a`20defined`20to`20be`20a`20no-op`20on
- V`20machines`20that`20don't`20have
- X`20*`20this`20problem.
- X`20*
- X`20*/
- X
- XSwapBitmaps()
- X`7B
- X`09register`20i;
- X
- X`09byteSwap(normalArrows);
- X`09byteSwap(invincibleArrows);
- X`09byteSwap(otherArrows);
- X`09byteSwap(numbers);`09/*`20only`20gets`20first`204`20*/
- X`09byteSwap(`26numbers`5B4`5D);`09/*`20get`20the`20rest`20*/
- X`09for`20(i`20=`200;`20i`20<`20ratBits_width`20*`20ratBits_height`20/`2016;
- V`20i`20+=`2064)
- X`09`09byteSwap((BitCell`20*)`20`26ratBits`5Bi`5D);
- X`7D
- X
- X/*
- X`20*`20Byte`20swap`204`2016x16`20bitmaps.
- X`20*/
- X
- XbyteSwap(bits)
- Xregister`20BitCell`20*bits;
- X`7B
- X`09register`20int`20i,`20j;
- X`09
- X`09for`20(i`20=`200;`20i`20<`204;`20i++,`20bits++)
- X`09`09for`20(j`20=`200;`20j`20<`2016;`20j++)
- X`09`09`09bits->bits`5Bj`5D`20=`20htons(bits->bits`5Bj`5D`20`26`200xffff);
- X`7D
- $ call unpack [.MAZEWAR]DISPLAY.C;1 1029848417 ""
- $!
- $ create 'f'
- X/*`20$Header:`20init.c,v`201.13`2088/09/07`2014:37:21`20kent`20Exp`20$`20*/
- X
- X/*`20
- X`20*`20init.c`20-`20Initialization`20code`20for`20mazewar
- X`20*`20
- X`20*`20Author:`09Christopher`20A.`20Kent
- X`20*`20`09`09Western`20Research`20Laboratory
- X`20*`09`20`09Digital`20Equipment`20Corporation
- X`20*`20Date:`09Thu`20Oct`20`202`201986
- X`20*/
- X
- X/***********************************************************
- XCopyright`201986`20by`20Digital`20Equipment`20Corporation,`20Maynard,`20Massac
- Vhusetts,
- X
- X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20All
- V`20Rights`20Reserved
- X
- XPermission`20to`20use,`20copy,`20modify,`20and`20distribute`20this`20software
- V`20and`20its`20
- Xdocumentation`20for`20any`20purpose`20and`20without`20fee`20is`20hereby`20gran
- Vted,`20
- Xprovided`20that`20the`20above`20copyright`20notice`20appear`20in`20all`20copie
- Vs`20and`20that
- Xboth`20that`20copyright`20notice`20and`20this`20permission`20notice`20appear
- V`20in`20
- Xsupporting`20documentation,`20and`20that`20the`20names`20of`20Digital`20not
- V`20be
- Xused`20in`20advertising`20or`20publicity`20pertaining`20to`20disstribution`20o
- Vf`20the
- Xsoftware`20without`20specific,`20written`20prior`20permission.`20`20
- X
- XDIGITAL`20DISCLAIMS`20ALL`20WARRANTIES`20WITH`20REGARD`20TO`20THIS`20SOFTWARE,
- V`20INCLUDING
- XALL`20IMPLIED`20WARRANTIES`20OF`20MERCHANTABILITY`20AND`20FITNESS,`20IN`20NO
- V`20EVENT`20SHALL
- XDIGITAL`20BE`20LIABLE`20FOR`20ANY`20SPECIAL,`20INDIRECT`20OR`20CONSEQUENTIAL
- V`20DAMAGES`20OR
- XANY`20DAMAGES`20WHATSOEVER`20RESULTING`20FROM`20LOSS`20OF`20USE,`20DATA`20OR
- V`20PROFITS,
- XWHETHER`20IN`20AN`20ACTION`20OF`20CONTRACT,`20NEGLIGENCE`20OR`20OTHER`20TORTIO
- VUS`20ACTION,
- XARISING`20OUT`20OF`20OR`20IN`20CONNECTION`20WITH`20THE`20USE`20OR`20PERFORMANC
- VE`20OF`20THIS
- XSOFTWARE.
- X
- X******************************************************************/
- X
- X/*
- X`20*`20vms`20port`207/93`20`20scott`20snyder`20<snyder@fnald0.fnal.gov>
- X`20*`20$Log:`09init.c,v`20$
- X`20*`20Revision`201.13`20`2088/09/07`20`2014:37:21`20`20kent
- X`20*`20Portability`20changes`20for`20broadcasts.
- X`20*`20
- X`20*`20Revision`201.12`20`2088/08/25`20`2009:57:53`20`20kent
- X`20*`20Copyright`20and`20changed`20to`20allow`20the`20broadcast`20address`20to
- V`20be`20set`20in`20Makefile.
- X`20*`20
- X`20*`20Revision`201.11`20`2088/06/15`20`2016:36:31`20`20kent
- X`20*`20Updated`20to`20use`20proper`20broadcast`20address.
- X`20*`20
- X`20*`20Revision`201.10`20`2087/07/28`20`2013:51:16`20`20kent
- X`20*`20Fixed`20a`20problem`20in`20netInit();`20didn't`20handle`20the`20case
- V`20when`20gethostname()
- X`20*`20returned`20something`20that`20couldn't`20be`20found`20in`20the`20host
- V`20table.
- X`20*`20
- X`20*`20Revision`201.9`20`2087/03/31`20`2014:42:14`20`20kent
- X`20*`20Portability`20considerations,`20especially`20byteswapping`20to/from`20t
- Vhe`20net.
- X`20*`20
- X`20*`20Revision`201.8`20`2086/12/04`20`2017:48:05`20`20kent
- X`20*`20findDuke's`20return`20value`20pointed`20to`20something`20on`20the`20sta
- Vck!
- X`20*`20
- X`20*`20Revision`201.7`20`2086/12/04`20`2011:16:54`20`20kent
- X`20*`20Handle`20name`20case`20when`20there's`20no`20comma`20in`20the`20gecos
- V`20field.
- X`20*`20
- X`20*`20Revision`201.6`20`2086/12/04`20`2011:14:23`20`20kent
- X`20*`20Clean`20up`20join,`20so`20you`20can`20specify`20any`20host`20in`20a`20g
- Vame,`20not`20just`20the`20duke.
- X`20*`20
- X`20*`20Revision`201.5`20`2086/12/03`20`2013:31:25`20`20kent
- X`20*`20
- X`20*`20
- X`20*`20Revision`201.4`20`2086/12/03`20`2010:00:45`20`20kent
- X`20*`20Changes`20to`20allow`20multiple`20players`20per`20machine.
- X`20*`20
- X`20*`20Revision`201.3`20`2086/12/01`20`2023:44:25`20`20kent
- X`20*`20Housecleaning`20and`20documentation`20pass.
- X`20*`20
- X`20*`20Revision`201.2`20`2086/12/01`20`2014:48:17`20`20kent
- X`20*`20Changes`20for`20a`20realistic`20implementation`20of`20shooting.
- X`20*`20
- X`20*`20Revision`201.1`20`2086/11/26`20`2016:57:42`20`20kent
- X`20*`20Initial`20revision
- X`20*`20
- X`20*/
- X
- X#ifndef`09lint
- Xstatic`20char`20rcs_ident`5B`5D`20=`20"$Header:`20init.c,v`201.13`2088/09/07
- V`2014:37:21`20kent`20Exp`20$";
- X#endif
- X
- X#include`20<sys/types.h>
- X#include`20<sys/socket.h>
- X#include`20<sys/time.h>
- X
- X#include`20<netinet/in.h>
- X
- X#include`20<errno.h>
- X#include`20<netdb.h>
- X#include`20<stdio.h>
- X#ifndef`20VMS
- X#include`20<pwd.h>
- X#include`20<string.h>
- X#endif
- X
- X#include`20"mazewar.h"
- X
- Xint`09RV`5BVECTORSIZE`5D`20=`20`7B
- X`090031575,`200055455,`200147160,`200176745,`200173126,`200117426,`200033612,
- V`200136020,
- X`090054013,`200167672,`200070252,`200033100,`200015700,`200113523,`200170465,
- V`200024344,
- X`090175535,`200137325,`200126211,`200010207,`200173547,`200016071,`200056622,
- V`200014433,
- X`090113225,`200047553,`200103024,`200110174,`200000124,`200173304,`200076700,
- V`200104042,
- X`090135030,`200126234,`200175154,`200140123,`200167542,`200000405,`200035464,
- V`200166537,
- X`090050260,`200167655,`200123715,`200176164,`200172206,`200140365,`200074606,
- V`200075656,
- X`090176163,`200030017,`200022102,`200040051,`200154620,`200017144,`200073372
- X`7D;
- X
- Xstatic`20MazeType`20mazeBits`20=`20`7B
- X`09`7B`201,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1`7D,`09/*`200`20*/
- X`09`7B`201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1`7D,
- X`09`7B`201,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1`7D,
- X`09`7B`201,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1`7D,
- X
- X`09`7B`201,0,1,0,1,0,0,0,1,0,1,1,1,1,0,1`7D,`09/*`201`20*/
- X`09`7B`201,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1`7D,
- X`09`7B`201,0,0,0,0,0,1,0,0,0,1,0,1,1,0,1`7D,
- X`09`7B`201,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1`7D,
- X
- X`09`7B`201,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1`7D,`09/*`202`20*/
- X`09`7B`201,0,1,1,1,1,1,0,1,0,1,0,0,0,0,1`7D,
- X`09`7B`201,0,0,0,0,0,1,0,0,0,1,0,1,1,1,1`7D,
- X`09`7B`201,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1`7D,
- X
- X`09`7B`201,0,0,0,0,0,1,0,1,0,1,1,1,1,0,1`7D,`09/*`203`20*/
- X`09`7B`201,0,1,1,1,1,1,0,1,0,1,1,0,1,0,1`7D,
- X`09`7B`201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1`7D,
- X`09`7B`201,0,1,1,1,1,1,1,1,0,1,0,1,1,1,1`7D,
- X
- X`09`7B`201,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1`7D,`09/*`204`20*/
- X`09`7B`201,1,1,0,1,0,1,0,1,0,1,0,1,1,0,1`7D,
- X`09`7B`201,0,0,0,1,0,1,0,1,0,1,0,0,1,0,1`7D,
- X`09`7B`201,0,1,1,1,0,1,0,1,0,1,1,0,0,0,1`7D,
- X
- X`09`7B`201,0,0,0,0,0,0,0,1,0,1,0,0,1,0,1`7D,`09/*`205`20*/
- X`09`7B`201,0,1,1,1,1,1,1,1,0,1,0,1,1,0,1`7D,
- X`09`7B`201,0,0,0,1,0,0,0,1,0,1,0,0,1,0,1`7D,
- X`09`7B`201,0,1,0,1,0,1,0,1,0,1,1,0,0,0,1`7D,
- X
- X`09`7B`201,0,1,0,1,0,1,0,1,0,0,0,0,1,0,1`7D,`09/*`206`20*/
- X`09`7B`201,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1`7D,
- X`09`7B`201,0,1,0,1,0,1,0,1,0,1,0,0,1,0,1`7D,
- X`09`7B`201,0,1,0,0,0,1,0,1,0,1,1,0,1,0,1`7D,
- X
- X`09`7B`201,0,1,0,1,0,1,0,0,0,1,0,0,0,0,1`7D,`09/*`207`20*/
- X`09`7B`201,0,1,0,1,0,1,0,1,0,1,1,1,1,0,1`7D,
- X`09`7B`201,0,0,0,1,0,0,0,1,0,0,0,0,1,0,1`7D,
- X`09`7B`201,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1`7D
- X`7D;
- X
- Xstatic`20char`09*ratName`20=`20NULL;
- Xstatic`20char`09*dukeName`20=`20NULL;
- Xstatic`20Sockaddr`09dukeAddr;
- X
- XSockaddr`09*resolveHost();
- X
- Xextern`20int`09errno;
- X
- XMazeInit(argc,`20argv)
- Xchar`09**argv;
- X`7B
- X`09register`20RatId`09ratId;
- X
- X`09for`20(ratId`20=`200;`20ratId`20<`20MAXRATS;`20ratId++)`20`7B
- X`09`09bzero((char`20*)`20M.ratcb.rats`5BratId`5D.name,`20NAMESIZE);
- X`09`09M.ratcb.rats`5BratId`5D.playing`20=`20FALSE;
- X`09`09R2d2`5BratId`5D.visible`20=`20FALSE;
- X`09`7D
- X`09M.invincible`20=`20FALSE;
- X`09M.omniscient`20=`20FALSE;
- X`09RatKillQ`20=`20(RatKillQ_t)`20NULL;
- X
- X`09getMaze();
- X
- X`09setRandom();
- X`09InitRandom();
- X
- X`09InitDisplay(argc,`20argv);
- X`09getNames();
- X`09NewPosition();
- X
- X`09/*
- X`09`20*`20We`20don't`20do`20ShowPosition()`20or`20ShowView()`20here,`20but`20l
- Vet`20the`20update
- X`09`20*`20routine`20in`20the`20window`20handler`20do`20it`20for`20the`20first
- V`20time`20when
- X`09`20*`20the`20window`20is`20exposed.
- X`09`20*/
- X
- X`09netInit();
- X`09StartDisplay();
- X`09RatCursor();
- X`7D
- X
- X/*`20get`20the`20maze`20into`20memory`20*/
- XgetMaze()
- X`7B
- X`09int`20i,`20j;
- X
- X`09for`20(i`20=`200;`20i`20<`20MAZEXMAX;`20i++)
- X`09`09for`20(j`20=`200;`20j`20<`20MAZEYMAX;`20j++)
- X`09`09`09if`20(mazeBits`5Bi`5D.y`5BMAZEYMAX-1`20-`20j`5D`20==`201)
- X`09`09`09`09M.maze`5Bi`5D.y`5Bj`5D`20=`20TRUE;
- X`09`09`09else
- X`09`09`09`09M.maze`5Bi`5D.y`5Bj`5D`20=`20FALSE;
- X`7D
- X
- X/*`20initialize`20the`20random`20vector`20*/
- XsetRandom()
- X`7B
- X`09register`09i;
- X
- X`09for`20(i`20=`200;`20i`20<`20VECTORSIZE;`20i++)
- X`09`09M.randomVector`5Bi`5D`20=`20RV`5Bi`5D;
- X`7D
- X
- X/*`20get`20player`20and`20duke`20host`20names`20*/
- XgetNames()
- X`7B
- X`09char`09`09buf`5B128`5D,`20*cp;
- X`09char`09`09*comma;
- X`09Sockaddr`09*duke;
- X`09char`09`09*getenv();
- X`09struct`20passwd`09*getpwuid();
- X
- X`09buf`5B0`5D`20=`20'`5C0';
- X`09printf("Welcome`20to`20Alto`20MazeWar!`5Cn`5Cn");
- X`09printf("Your`20Name:`20");
- X`09gets(buf);
- X`09if`20(buf`5B0`5D`20==`20'`5C0')`20`7B
- X`09`09if`20((cp`20=`20getenv("USERNAME"))`20!=`20NULL)
- X`09`09`09strcpy(buf,`20cp);
- X`09`09else`20if`20((cp`20=`20getenv("USER"))`20!=`20NULL)
- X`09`09`09strcpy(buf,`20cp);
- X`09`09else`20`7B
- X#ifdef`20VMS
- X`09`09`20`20`20`20`20`20`20`20strcpy`20(buf,`20"Whozit?");
- X#else
- X`09`09`09strcpy(buf,`20(getpwuid(getuid()))->pw_gecos);
- X`09`09`09comma`20=`20index(buf,`20',');
- X`09`09`09if`20(comma`20!=`20NULL)
- X`09`09`09`09*comma`20=`20'`5C0';
- X#endif
- X`09`09`7D
- X`09`7D
- X`09ratName`20=`20malloc((unsigned)`20(strlen(buf)`20+`201));
- X`09if`20(ratName`20==`20NULL)
- X`09`09MWError("no`20mem`20for`20ratName");
- X`09strcpy(ratName,`20buf);
- X`09for`20(duke`20=`20NULL;`20duke`20==`20NULL;`20)`20`7B
- X#ifndef`09NO_BROADCAST
- X`09`09printf("Duke`20Host`20(CR`20for`20any`20game):`20");
- X#else
- X`09`09printf("Duke`20Host:`20");
- X#endif`09NO_BROADCAST
- X`09`09gets(buf);
- X`09`09if`20(strlen(buf)`20==`200)
- X`09`09`09break;
- X`09`09dukeName`20=`20malloc((unsigned)`20(strlen(buf)`20+`201));
- X`09`09if`20(dukeName`20==`20NULL)
- X`09`09`09MWError("no`20mem`20for`20dukeName");
- X`09`09strcpy(dukeName,`20buf);
- X
- X`09`09/*`20check`20for`20valid`20duke`20name`20*/
- X`09`09duke`20=`20resolveHost(dukeName);
- X`09`09if`20(duke`20==`20(Sockaddr`20*)`20NULL)`20`7B
- X`09`09`09printf("Don't`20know`20host`20%s`5Cn",`20dukeName);
- X`09`09`09free(dukeName);
- X`09`09`09dukeName`20=`20NULL;
- X`09`09`7D
- X`09`7D
- X`09if`20((dukeName`20!=`20NULL)`20`26`26
- X`09`20`20`20`20(strlen(dukeName)`20!=`200))
- X`09`09bcopy((char`20*)`20duke,`20(char`20*)`20`26dukeAddr,`20sizeof(Sockaddr))
- V;
- X`7D
- X
- XnetInit()
- X`7B
- X`09register`20RatId`09ratId;
- X`09Boolean`09`09joinGame();
- X`09struct`20servent`09*mazeService;
- X`09u_short`09`09port;
- X`09Sockaddr`09nullAddr;
- X`09Sockaddr`09*thisHost;
- X`09char`09`09buf`5B128`5D;
- X
- X`09mazeService`20=`20getservbyname(MAZESERVICE,`20"udp");
- X`09if`20(mazeService`20!=`20(struct`20servent`20*)`20NULL)
- X`09`09M.mazePort`20=`20mazeService->s_port;
- X`09else
- X`09`09M.mazePort`20=`20htons(MAZEPORT);
- X
- X`09gethostname(buf,`20sizeof(buf));
- X`09if`20((thisHost`20=`20resolveHost(buf))`20==`20(Sockaddr`20*)`20NULL)
- X`09`09MWError("who`20am`20I?");
- X`09bcopy((caddr_t)`20thisHost,`20(caddr_t)`20`26M.myAddr,`20sizeof(Sockaddr));
- V
- X`09nullAddr`20=`20M.myAddr;
- X`09bzero((char`20*)`26nullAddr.sin_addr,`20sizeof(nullAddr.sin_addr));
- X
- X`09/*`20
- X`09`20*`20Figure`20out`20which`20port`20I`20can`20use.`20Start`20at`20MAZEPORT
- V`20and`20go
- X`09`20*`20up`20till`20there's`20a`20free`20one.`20We`20use`20nullAddr`20so`20t
- Vhat`20we
- X`09`20*`20can`20receive`20any`20incoming`20packet,`20in`20case`20there's`20som
- Ve
- X`09`20*`20multi-homed`20nonsense.`20However,`20not`20binding`20may`20cause`20t
- Vroubles
- X`09`20*`20if`20a`20specified`20duke`20is`20on`20a`20net`20that`20causes`20the
- V`20source`20of`20the
- X`09`20*`20packets`20to`20be`20something`20other`20than`20what`20M.myAddr`20is.
- V..
- X`09`20*`20There`20also`20seems`20to`20be`20a`20problem`20with`20broadcasts`20n
- Vot`20being
- X`09`20*`20accepted`20on`20sockets`20that`20have`20an`20address`20bound`20to
- V`20them.
- X`09`20*/
- X
- X`09M.theSocket`20=`20socket(AF_INET,`20SOCK_DGRAM,`200);
- X`09if`20(M.theSocket`20<`200)
- X`09`09MWError("can't`20get`20socket");
- X
- X`09for`20(port`20=`20ntohs(M.mazePort);`20;`20port++)`20`7B
- X`09`09nullAddr.sin_port`20=`20htons(port);
- X`09`09if`20(bind(M.theSocket,`20`26nullAddr,`20sizeof(nullAddr))`20<`200)
- X#ifdef`20VMS
- X`09`09`09if`20(socket_errno`20!=`20EADDRINUSE)
- X#else
- X`09`09`09if`20(errno`20!=`20EADDRINUSE)
- X#endif
- X`09`09`09`09MWError("netInit`20binding");
- X`09`09`09else
- X`09`09`09`09continue;
- X`09`09else
- X`09`09`09break;
- X`09`7D
- X`09M.myAddr.sin_port`20=`20nullAddr.sin_port;
- X
- X`09/*
- X`09`20*`20Now`20we`20can`20try`20to`20find`20a`20game`20to`20join;`20if`20none
- V,`20start`20one.
- X`09`20*/
- X
- X`09if`20(!joinGame())
- X`09`09startGame();
- X`09printf("`5Cn");
- X
- X`09for`20(ratId`20=`200;`20ratId`20<`20MAXRATS;`20ratId++)
- X`09`09TokenVisible(ratId);`09/*`20oh`20oh`20say`20can`20we`20see?`20*/
- X
- X`7D
- X
- X/*`20
- X`20*`20Find`20a`20game.`20If`20the`20user`20specified`20a`20"duke"`20host,`20c
- Vontact`20that
- X`20*`20duke.`20Otherwise`20broadcast`20to`20find`20a`20duke.`20Finally`20join
- V`20that`20game.
- X`20*/
- X
- XBoolean
- XjoinGame()
- X`7B
- X`09Sockaddr`09*duke,`20*findDuke();
- X`09Boolean`09`09join();
- X
- X`09if`20((dukeName`20==`20NULL)`20`7C`7C
- X`09`20`20`20`20(strlen(dukeName)`20==`200))`20`7B
- X`09`09duke`20=`20findDuke();
- X`09`09if`20(duke`20!=`20NULL)
- X`09`09`09bcopy((char`20*)`20duke,`20(char`20*)`20`26dukeAddr,
- X`09`09`09`09sizeof(Sockaddr));
- X`09`09else
- X`09`09`09return`20FALSE;
- X`09`7D`20else
- X`09`09dukeAddr.sin_port`20=`20M.mazePort;
- X`09return`20join(dukeAddr);
- X`7D
- X
- X/*`20
- X`20*`20No`20game`20to`20join;`20set`20ourselves`20up`20as`20duke`20and`20wait
- V`20for`20others`20to`20join.
- X`20*/
- X
- XstartGame()
- X`7B
- X`09RatId`09i;
- X`09RatInfo`09`09rsp;
- X
- X`09printf("starting`20a`20new`20game");
- X`09M.myRatId`20=`200;
- X`09M.score`20=`200;
- X`09SetMyRatId(0);
- X`09M.ratcb.dukeRat`20=`20M.myRatId;
- X`09M.ratcb.rats`5BM.myRatId`5D.addr`20=`20M.myAddr;
- X`09rsp`20=`20`26M.ratcb.rats`5BM.myRatId`5D;
- X`09rsp->playing`20=`20TRUE;
- X`09rsp->xLoc`20=`20M.xloc;
- X`09rsp->yLoc`20=`20M.yloc;
- X`09rsp->dir`20=`20M.dir;
- X`09rsp->score`20=`20M.score;
- X`09rsp->addr`20=`20M.myAddr;
- X`09strncpy(rsp->name,`20ratName,`20NAMESIZE);
- X`09for`20(i`20=`201;`20i`20<`20MAXRATS;`20i++)
- X`09`09M.ratcb.rats`5Bi`5D.playing`20=`20FALSE;
- X`09M.duke`20=`20TRUE;
- X`7D
- X
- X/*`20
- X`20*`20Join`20an`20existing`20game.`20Send`20a`20RAT_NEW`20packet`20and`20wait
- V`20for`20a
- X`20*`20RAT_STATUS`20packet`20to`20come`20back`20with`20the`20other`20players.
- V`20
- X`20*/
- X
- XBoolean
- Xjoin(addr)
- XSockaddr`20addr;
- X`7B
- X`09RatPacket`09b,`20r;
- X`09RatNew`09`09ratNew;
- X`09RatId`09`09id;
- X`09RatStatus`09status;
- X`09int`09`09i,`20ret;
- X`09fd_set`09`09fds;
- X`09struct`20timeval`09timeout;
- X`09Boolean`09`09retVal`20=`20FALSE;
- X`09
- X`09b.type`20=`20RAT_NEW;
- X`09ratNew`20=`20(RatNew)`20`26b.body;
- X`09ratNew->pass`20=`20RAT_PASSWORD;
- X`09ratNew->xLoc`20=`20M.xloc;
- X`09ratNew->yLoc`20=`20M.yloc;
- X`09ratNew->dir`20=`20M.dir;
- X`09ratNew->addr`20=`20M.myAddr;
- X`09strncpy(ratNew->name,`20ratName,`20NAMESIZE);
- X`09free(ratName);
- X`09ConvertOutgoing(`26b);
- X
- X`09for`20(i`20=`200;`20i`20<`205;`20i++)`20`7B
- X`09`09int`20fromlen;
- X`09`09struct`20sockaddr`20from;
- X
- X`09`09if`20(sendto(M.theSocket,`20(char`20*)`20`26b,`20sizeof(b),`200,`20`26ad
- Vdr,
- X`09`09`09`20`20`20sizeof(addr))`20<`200)
- X`09`09`09MWError("join`20sendto");
- X`09`09FD_ZERO`20(`26fds);
- X`09`09FD_SET`20(M.theSocket,`20`26fds);
- X`09`09timeout.tv_sec`20=`205;
- X`09`09timeout.tv_usec`20=`200;
- X`09`09ret`20=`20select(FD_SETSIZE,`20`26fds,`20NULL,`20NULL,`20`26timeout);
- X`09`09if`20(ret`20<`200)
- X`09`09`09MWError("join`20select");
- X`09`09if`20(ret`20==`200)
- X`09`09`09continue;
- X`09`09if`20(recvfrom(M.theSocket,`20(char`20*)`20`26r,`20sizeof(r),
- X`09`09`09`090,`20`26from,`20`26fromlen)`20<`200)
- X`09`09`09MWError("join`20status`20receive");
- X`09`09ConvertIncoming(`26r);
- X`09`09if`20(r.type`20!=`20RAT_STATUS)
- X`09`09`09continue;
- X
- X`09`09/*`20see`20if`20I`20got`20into`20the`20game`20*/
- X`09`09status`20=`20`26r.body;
- X`09`09for`20(id`20=`200;`20id`20<`20MAXRATS;`20id++)
- X`09`09`09if`20(status->rats`5Bid`5D.playing`20`26`26
- X`09`09`09`20`20`20`20!bcmp(`26status->rats`5Bid`5D.addr,`20`26M.myAddr,
- X`09`09`09`09`20`20sizeof(M.myAddr)))`20`7B
- X`09`09`09`09M.myRatId`20=`20id;
- X`09`09`09`09break;
- X`09`09`09`7D
- X
- X`09`09/*`20
- X`09`09`20*`20Didn't`20find`20me;`20this`20guy`20must`20not`20really`20be`20the
- V
- X`09`09`20*`20duke.`20Contact`20the`20duke`20of`20the`20game`20and`20get`20adde
- Vd.
- X`09`09`20*/
- X
- X`09`09if`20(id`20==`20MAXRATS)`20`7B
- X`09`09`09addr`20=`20status->rats`5Bstatus->dukeRat`5D.addr;
- X`09`09`09continue;
- X`09`09`7D
- X`09`09
- X`09`09bcopy((char`20*)`20status,`20(char`20*)`20`26M.ratcb,`20sizeof(RatCb));
- X`09`09retVal`20=`20TRUE;
- X`09`09break;
- X`09`7D
- X`09return`20retVal;
- X`7D
- X
- X/*`20
- X`20*`20Find`20a`20"duke"`20host.`20Broadcast`20a`20RAT_SURVEY`20packet`20to
- V`20MAZEPORT.
- X`20*
- X`20*`20The`20broadcast`20is`20done`20just`20on`20the`20network`20that`20is`20a
- Vssociated
- X`20*`20with`20the`20name`20returned`20by`20gethostname();`20for`20most`20works
- Vtations
- X`20*`20this`20is`20accurate,`20but`20multi-homed`20hosts`20may`20miss`20some
- V`20games.`20Oh
- X`20*`20well.
- X`20*
- X`20*`20After`20the`20broadcast,`20collect`20responses.`20This`20goes`20on`20un
- Vtil`20no`20packets
- X`20*`20have`20been`20received`20for`205`20seconds`20or`20the`20max`20number
- V`20have`20been`20seen
- X`20*
- X`20*`20All`20players`20are`20supposed`20to`20respond.`20If`20a`20packet`20come
- Vs`20from`20a`20non-duke,
- X`20*`20the`20information`20is`20inspected`20to`20send`20a`20RAT_SURVEY`20direc
- Vtly`20to`20him.
- X`20*`20Otherwise,`20the`20answer`20is`20saved.`20When`20all`20the`20answers
- V`20are`20in,`20the
- X`20*`20first`20game`20with`20an`20empty`20slot`20is`20chosen.
- X`20*
- X`20*`20If`20all`20players`20were`20listening`20on`20MAZEPORT,`20we`20could`20p
- Vrobably`20do
- X`20*`20without`20the`20resending`20nonsense.`20Since`20the`20duke`20might`20no
- Vt`20be`20on
- X`20*`20MAZEPORT,`20this`20is`20necessary.`20It`20also`20adds`20a`20certain`20r
- Vobustness,`20in
- X`20*`20case`20the`20duke`20drops`20the`20packet`20or`20somesuch.`20Care`20is
- V`20taken`20elsewhere
- X`20*`20(ratLeft()`20and`20ratDoctor())to`20make`20sure`20there`20are`20always
- V`20players
- X`20*`20listening`20on`20MAZEPORT.
- X`20*/
- X
- Xstruct`20answer`20`7B
- X`09Sockaddr`09source;
- X`09int`09`09srclen;
- X`09RatPacket`09packet;
- X`7D;
- X
- XSockaddr`20*
- XfindDuke()
- X`7B
- X#ifndef`09NO_BROADCAST
- X`09register`20int`09i;
- X`09int`09`09cnt`20=`200;
- X`09int`09`09maxAnswers`20=`2010;
- X`09static`20Sockaddr`09rmtAddr;
- X`09struct`09timeval`09timeout;
- X`09RatPacket`09*b`20=`20(RatPacket`20*)`20malloc(sizeof(RatPacket));
- X`09struct`20answer`09*answers;
- X`09int`09`09fd`20=`20M.theSocket;
- X`09fd_set`20`20`20`20`20`20`20`20`20`20fds;
- X`09int`09`09ret,`20cc;
- X`09Boolean`09`09duke(),`20freeSlot();
- X`09u_long`09`09inet_makeaddr();
- X
- X`09printf("Checking`20out`20available`20games...");`20fflush(stdout);
- X
- X#ifdef`09SO_BROADCAST
- X#ifdef`09BSD_43
- X`09`7B
- X`09int`09one`20=`201;
- X
- X`09if`20(setsockopt(M.theSocket,`20SOL_SOCKET,`20SO_BROADCAST,`20
- X`09`09`09`09`26one,`20sizeof`20one)`20<`200)
- X`09`09MWError("can't`20get`20broadcast`20permission");
- X`09`7D
- X#else`09BSD_43
- X`09if`20(setsockopt(M.theSocket,`20SOL_SOCKET,`20SO_BROADCAST,`20NULL,`200)
- V`20<`200)
- X`09`09MWError("can't`20get`20broadcast`20permission");
- X#endif`09BSD_43
- X#endif`09SO_BROADCAST
- X
- X`09rmtAddr`20=`20M.myAddr;
- X`09rmtAddr.sin_addr.s_addr`20=`20inet_makeaddr(inet_netof(M.myAddr.sin_addr),
- X`09`09`09`09`09BROAD_ADDR);`09/*`20from`20Makefile`20*/
- X`09rmtAddr.sin_port`20=`20M.mazePort;
- X
- X`09answers`20=`20(struct`20answer`20*)
- X`09`09malloc((unsigned)`20(maxAnswers`20*`20sizeof(*answers)));
- X
- X`09setupSurvey(b);
- X`09ConvertOutgoing(b);
- X`09if`20(sendto(fd,`20(char`20*)`20b,`20sizeof(*b),`200,`20`26rmtAddr,`20sizeo
- Vf(rmtAddr))`20<`200)
- X`09`09fprintf(stderr,`20"findDuke`20survey`20can't`20broadcast`5Cn");
- X
- X`09while`20(1)`20`7B
- X`20`20`09`20`20`20`20`20`20`20`20FD_ZERO`20(`26fds);
- X`09`09FD_SET`20(fd,`20`26fds);
- X`09`09timeout.tv_sec`20=`205;
- X`09`09timeout.tv_usec`20=`200;
- X`09`09ret`20=`20select(FD_SETSIZE,`20`26fds,`20NULL,`20NULL,`20`26timeout);
- X`09`09if`20(ret`20<`200)
- X`09`09`09MWError("findDuke`20select");
- X`09`09if`20(ret`20==`200)
- X`09`09`09break;
- X`09`09answers`5Bcnt`5D.srclen`20=`20sizeof(Sockaddr);
- X`09`09if`20(recvfrom(fd,`20`26answers`5Bcnt`5D.packet,`20sizeof(RatPacket),
- V`200,
- X`09`09`09`20`20`20`20`20`26answers`5Bcnt`5D.source,`20`26answers`5Bcnt`5D.srcl
- Ven)`20<`200)
- X`09`09`09MWError("findDuke`20recv");
- X`09`09ConvertIncoming(`26answers`5Bcnt`5D.packet);
- X`09`09if`20(answers`5Bcnt`5D.packet.type`20!=`20RAT_STATUS)
- X`09`09`09continue;
- X`09`09if`20(!duke(`26answers`5Bcnt`5D))`20`7B
- X`09`09`09RatStatus`09rs;
- X
- X`09`09`09rs`20=`20(RatStatus)`20`26answers`5Bcnt`5D.packet.body;
- X`09`09`09setupSurvey(b);
- X`09`09`09ConvertOutgoing(b);
- X`09`09`09if`20(sendto(fd,`20b,`20sizeof(*b),`200,
- X`09`09`09`09`20`20`20`26rs->rats`5Brs->dukeRat`5D.addr,
- X`09`09`09`09`20`20`20sizeof(rs->rats`5Brs->dukeRat`5D.addr))`20<`200)
- X`09`09`09`09fprintf(stderr,`20
- X`09`09`09`09`09"findDuke`20resend`20can't`20broadcast");
- X`09`09`09continue;
- X`09`09`7D
- X`09`09if`20(freeSlot(`26answers`5Bcnt`5D))
- X`09`09`09if`20(++cnt`20==`20maxAnswers)
- X`09`09`09`09break;
- X`09`7D
- X
- X`09for`20(i`20=`200;`20i`20<`20cnt;`20i++)
- X`09`09if`20(duke(`26answers`5Bi`5D))`20`7B
- X`09`09`09rmtAddr`20=`20answers`5Bi`5D.source;
- X`09`09`09break;
- X`09`09`7D
- X`09free((char`20*)`20answers);
- X`09free((char`20*)`20b);
- X`09if`20(i`20==`20cnt)
- X`09`09return`20(Sockaddr`20*)`20NULL;
- X`09else
- X`09`09return`20`26rmtAddr;
- X#else`09NO_BROADCAST
- X`09return`20(Sockaddr`20*)`20NULL;
- X#endif`09NO_BROADCAST
- X`7D
- X
- X/*`20
- X`20*`20See`20if`20the`20game`20contains`20any`20empty`20slots`20for`20players.
- V
- X`20*/
- X
- XBoolean
- XfreeSlot(a)
- Xstruct`20answer`09*a;
- X`7B
- X`09RatStatus`09test;
- X`09RatId`09`09id;
- X
- X`09test`20=`20(RatStatus)`20`26a->packet.body;
- X`09for`20(id`20=`200;`20id`20<`20MAXRATS;`20id++)
- X`09`09if`20(!test->rats`5Bid`5D.playing)
- X`09`09`09return`20TRUE;
- X`09return`20FALSE;
- X`7D
- X
- X/*`20
- X`20*`20Fill`20in`20the`20RAT_SURVEY`20packet.
- X`20*/
- X
- XsetupSurvey(b)
- XRatPacket`20*b;
- X`7B
- X`09RatNew`09ratSurvey;
- X
- X`09b->type`20=`20RAT_SURVEY;
- X`09ratSurvey`20=`20(RatNew)`20`26b->body;
- X`09ratSurvey->pass`20=`20RAT_PASSWORD;
- X`7D
- X
- X/*`20
- X`20*`20Check`20if`20this`20guy's`20the`20duke`20of`20his`20game.
- X`20*/
- X
- XBoolean
- Xduke(a)
- Xstruct`20answer`09*a;
- X`7B
- X`09RatStatus`09test;
- X
- X`09test`20=`20(RatStatus)`20`26a->packet.body;
- X`09return`20!bcmp((char`20*)`20`26test->rats`5Btest->dukeRat`5D.addr.sin_addr,
- V
- X`09`09`09(char`20*)`20`26a->source.sin_addr,`20sizeof(struct`20in_addr));
- X`7D
- X
- X/*
- X`20*`20Resolve`20the`20specified`20host`20name`20into`20an`20internet`20addres
- Vs.`20`20The`20"name"`20may
- +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+-
-