home *** CD-ROM | disk | FTP | other *** search
/ NetGuide 2004 April / NETGUID0404N.iso / mac / games / Mac / Brickoids / brickoidsx.dmg / Source / main.c < prev    next >
MacBinary  |  2002-01-14  |  89.3 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, busy, Mon Jan 14 12:10:14 2002, modified Mon Jan 14 12:10:14 2002, creator 'CWIE', type ASCII, 46601 bytes "main.c" , at 0xb689 44535 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 6d 61 69 6e 2e 63 | 00 00 00 00 00 00 00 00 |..main.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 05 00 00 bd 00 fd 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 b6 09 00 | 00 ad f7 b8 68 c1 76 b8 |........|....h.v.|
|00000060| 68 c1 76 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |h.v.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7f 6f 00 00 |........|.....o..|
|00000080| 2f 2a 0a 20 20 20 20 42 | 72 69 63 6b 6f 69 64 73 |/*. B|rickoids|
|00000090| 20 58 20 2d 2d 20 53 69 | 6d 70 6c 65 20 62 72 69 | X -- Si|mple bri|
|000000a0| 63 6b 20 67 61 6d 65 20 | 66 6f 72 20 4d 61 63 4f |ck game |for MacO|
|000000b0| 53 20 58 0a 20 20 20 20 | 43 6f 70 79 72 69 67 68 |S X. |Copyrigh|
|000000c0| 74 20 28 43 29 20 31 39 | 39 37 2d 32 30 30 32 20 |t (C) 19|97-2002 |
|000000d0| 54 68 6f 72 6c 69 6e 64 | 75 72 20 54 68 6f 72 6f |Thorlind|ur Thoro|
|000000e0| 6c 66 73 73 6f 6e 20 26 | 20 53 76 65 69 6e 62 6a |lfsson &| Sveinbj|
|000000f0| 6f 72 6e 20 54 68 6f 72 | 64 61 72 73 6f 6e 0a 20 |orn Thor|darson. |
|00000100| 20 20 20 53 6f 74 68 20 | 44 65 76 65 6c 6f 70 6d | Soth |Developm|
|00000110| 65 6e 74 20 28 68 74 74 | 70 3a 2f 2f 73 6f 74 68 |ent (htt|p://soth|
|00000120| 2e 7a 6f 6e 65 69 74 2e | 63 6f 6d 29 0a 20 20 20 |.zoneit.|com). |
|00000130| 20 0a 20 20 20 20 4f 72 | 69 67 69 6e 61 6c 20 73 | . Or|iginal s|
|00000140| 6f 75 72 63 65 20 63 6f | 64 65 20 62 79 20 54 68 |ource co|de by Th|
|00000150| 6f 72 6c 69 6e 64 75 72 | 20 54 68 6f 72 6f 6c 66 |orlindur| Thorolf|
|00000160| 73 73 6f 6e 0a 20 20 20 | 20 50 6f 72 74 69 6e 67 |sson. | Porting|
|00000170| 20 74 6f 20 4d 61 63 4f | 53 20 58 20 62 79 20 53 | to MacO|S X by S|
|00000180| 76 65 69 6e 62 6a 6f 72 | 6e 20 54 68 6f 72 64 61 |veinbjor|n Thorda|
|00000190| 72 73 6f 6e 0a 0a 20 20 | 20 20 54 68 69 73 20 73 |rson.. | This s|
|000001a0| 6f 66 74 77 61 72 65 20 | 77 61 73 20 6f 70 65 6e |oftware |was open|
|000001b0| 2d 73 6f 75 72 63 65 64 | 20 6f 6e 20 74 68 65 20 |-sourced| on the |
|000001c0| 31 73 74 20 6f 66 20 4d | 61 79 2c 20 32 30 30 30 |1st of M|ay, 2000|
|000001d0| 2e 0a 0a 20 20 20 20 54 | 68 69 73 20 70 72 6f 67 |... T|his prog|
|000001e0| 72 61 6d 20 69 73 20 66 | 72 65 65 20 73 6f 66 74 |ram is f|ree soft|
|000001f0| 77 61 72 65 3b 20 79 6f | 75 20 63 61 6e 20 72 65 |ware; yo|u can re|
|00000200| 64 69 73 74 72 69 62 75 | 74 65 20 69 74 20 61 6e |distribu|te it an|
|00000210| 64 2f 6f 72 20 6d 6f 64 | 69 66 79 0a 20 20 20 20 |d/or mod|ify. |
|00000220| 69 74 20 75 6e 64 65 72 | 20 74 68 65 20 74 65 72 |it under| the ter|
|00000230| 6d 73 20 6f 66 20 74 68 | 65 20 47 4e 55 20 47 65 |ms of th|e GNU Ge|
|00000240| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|00000250| 65 6e 73 65 20 61 73 20 | 70 75 62 6c 69 73 68 65 |ense as |publishe|
|00000260| 64 20 62 79 0a 20 20 20 | 20 74 68 65 20 46 72 65 |d by. | the Fre|
|00000270| 65 20 53 6f 66 74 77 61 | 72 65 20 46 6f 75 6e 64 |e Softwa|re Found|
|00000280| 61 74 69 6f 6e 3b 20 65 | 69 74 68 65 72 20 76 65 |ation; e|ither ve|
|00000290| 72 73 69 6f 6e 20 32 20 | 6f 66 20 74 68 65 20 4c |rsion 2 |of the L|
|000002a0| 69 63 65 6e 73 65 2c 20 | 6f 72 0a 20 20 20 20 28 |icense, |or. (|
|000002b0| 61 74 20 79 6f 75 72 20 | 6f 70 74 69 6f 6e 29 20 |at your |option) |
|000002c0| 61 6e 79 20 6c 61 74 65 | 72 20 76 65 72 73 69 6f |any late|r versio|
|000002d0| 6e 2e 0a 0a 20 20 20 20 | 54 68 69 73 20 70 72 6f |n... |This pro|
|000002e0| 67 72 61 6d 20 69 73 20 | 64 69 73 74 72 69 62 75 |gram is |distribu|
|000002f0| 74 65 64 20 69 6e 20 74 | 68 65 20 68 6f 70 65 20 |ted in t|he hope |
|00000300| 74 68 61 74 20 69 74 20 | 77 69 6c 6c 20 62 65 20 |that it |will be |
|00000310| 75 73 65 66 75 6c 2c 0a | 20 20 20 20 62 75 74 20 |useful,.| but |
|00000320| 57 49 54 48 4f 55 54 20 | 41 4e 59 20 57 41 52 52 |WITHOUT |ANY WARR|
|00000330| 41 4e 54 59 3b 20 77 69 | 74 68 6f 75 74 20 65 76 |ANTY; wi|thout ev|
|00000340| 65 6e 20 74 68 65 20 69 | 6d 70 6c 69 65 64 20 77 |en the i|mplied w|
|00000350| 61 72 72 61 6e 74 79 20 | 6f 66 0a 20 20 20 20 4d |arranty |of. M|
|00000360| 45 52 43 48 41 4e 54 41 | 42 49 4c 49 54 59 20 6f |ERCHANTA|BILITY o|
|00000370| 72 20 46 49 54 4e 45 53 | 53 20 46 4f 52 20 41 20 |r FITNES|S FOR A |
|00000380| 50 41 52 54 49 43 55 4c | 41 52 20 50 55 52 50 4f |PARTICUL|AR PURPO|
|00000390| 53 45 2e 20 20 53 65 65 | 20 74 68 65 0a 20 20 20 |SE. See| the. |
|000003a0| 20 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 | GNU Gen|eral Pub|
|000003b0| 6c 69 63 20 4c 69 63 65 | 6e 73 65 20 66 6f 72 20 |lic Lice|nse for |
|000003c0| 6d 6f 72 65 20 64 65 74 | 61 69 6c 73 2e 0a 0a 20 |more det|ails... |
|000003d0| 20 20 20 59 6f 75 20 73 | 68 6f 75 6c 64 20 68 61 | You s|hould ha|
|000003e0| 76 65 20 72 65 63 65 69 | 76 65 64 20 61 20 63 6f |ve recei|ved a co|
|000003f0| 70 79 20 6f 66 20 74 68 | 65 20 47 4e 55 20 47 65 |py of th|e GNU Ge|
|00000400| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|00000410| 65 6e 73 65 0a 20 20 20 | 20 61 6c 6f 6e 67 20 77 |ense. | along w|
|00000420| 69 74 68 20 74 68 69 73 | 20 70 72 6f 67 72 61 6d |ith this| program|
|00000430| 3b 20 69 66 20 6e 6f 74 | 2c 20 77 72 69 74 65 20 |; if not|, write |
|00000440| 74 6f 20 74 68 65 20 46 | 72 65 65 20 53 6f 66 74 |to the F|ree Soft|
|00000450| 77 61 72 65 0a 20 20 20 | 20 46 6f 75 6e 64 61 74 |ware. | Foundat|
|00000460| 69 6f 6e 2c 20 49 6e 63 | 2e 2c 20 36 37 35 20 4d |ion, Inc|., 675 M|
|00000470| 61 73 73 20 41 76 65 2c | 20 43 61 6d 62 72 69 64 |ass Ave,| Cambrid|
|00000480| 67 65 2c 20 4d 41 20 30 | 32 31 33 39 2c 20 55 53 |ge, MA 0|2139, US|
|00000490| 41 2e 0a 0a 2a 2f 0a 0a | 23 69 6e 63 6c 75 64 65 |A...*/..|#include|
|000004a0| 20 3c 43 61 72 62 6f 6e | 2f 43 61 72 62 6f 6e 2e | <Carbon|/Carbon.|
|000004b0| 68 3e 0a 0a 23 69 6e 63 | 6c 75 64 65 20 22 62 72 |h>..#inc|lude "br|
|000004c0| 69 63 6b 73 2e 68 22 0a | 23 69 6e 63 6c 75 64 65 |icks.h".|#include|
|000004d0| 20 22 70 72 6f 74 6f 74 | 79 70 65 73 2e 68 22 0a | "protot|ypes.h".|
|000004e0| 0a 2f 2f 6f 6e 6c 79 20 | 77 69 6e 64 6f 77 20 61 |.//only |window a|
|000004f0| 6e 64 20 6f 6e 6c 79 20 | 70 6f 72 74 20 75 73 65 |nd only |port use|
|00000500| 64 20 69 6e 20 61 70 70 | 0a 57 69 6e 64 6f 77 50 |d in app|.WindowP|
|00000510| 74 72 09 67 61 6d 65 57 | 69 6e 64 6f 77 3b 0a 0a |tr.gameW|indow;..|
|00000520| 4d 65 6e 75 48 61 6e 64 | 6c 65 09 61 70 70 6c 69 |MenuHand|le.appli|
|00000530| 63 61 74 69 6f 6e 4d 65 | 6e 75 3b 2f 2f 73 69 6e |cationMe|nu;//sin|
|00000540| 63 65 20 77 65 27 72 65 | 20 69 6e 20 4f 53 20 58 |ce we're| in OS X|
|00000550| 2c 20 77 65 20 6e 6f 20 | 6c 6f 6e 67 65 72 20 75 |, we no |longer u|
|00000560| 73 65 20 61 6e 20 41 70 | 70 6c 65 20 6d 65 6e 75 |se an Ap|ple menu|
|00000570| 0a 4d 65 6e 75 48 61 6e | 64 6c 65 09 66 69 6c 65 |.MenuHan|dle.file|
|00000580| 4d 65 6e 75 3b 0a 4d 65 | 6e 75 48 61 6e 64 6c 65 |Menu;.Me|nuHandle|
|00000590| 09 6f 70 74 69 6f 6e 73 | 4d 65 6e 75 3b 0a 0a 2f |.options|Menu;../|
|000005a0| 2f 67 6c 6f 62 61 6c 20 | 62 6f 6f 6c 65 61 6e 73 |/global |booleans|
|000005b0| 20 66 6f 72 20 6f 70 74 | 69 6f 6e 73 20 61 6e 64 | for opt|ions and|
|000005c0| 20 73 65 74 74 69 6e 67 | 73 0a 42 6f 6f 6c 65 61 | setting|s.Boolea|
|000005d0| 6e 20 09 67 50 6c 61 79 | 69 6e 67 20 3d 20 66 61 |n .gPlay|ing = fa|
|000005e0| 6c 73 65 3b 0a 42 6f 6f | 6c 65 61 6e 09 09 67 44 |lse;.Boo|lean..gD|
|000005f0| 6f 6e 65 20 3d 20 66 61 | 6c 73 65 3b 0a 42 6f 6f |one = fa|lse;.Boo|
|00000600| 6c 65 61 6e 09 09 67 50 | 61 75 73 65 64 20 3d 20 |lean..gP|aused = |
|00000610| 66 61 6c 73 65 3b 0a 0a | 42 6f 6f 6c 65 61 6e 09 |false;..|Boolean.|
|00000620| 09 67 53 6f 75 6e 64 4f | 6e 20 3d 20 74 72 75 65 |.gSoundO|n = true|
|00000630| 3b 0a 42 6f 6f 6c 65 61 | 6e 09 09 67 4d 75 73 69 |;.Boolea|n..gMusi|
|00000640| 63 4f 6e 20 3d 20 74 72 | 75 65 3b 0a 0a 42 6f 6f |cOn = tr|ue;..Boo|
|00000650| 6c 65 61 6e 09 09 67 41 | 62 6f 75 74 53 63 72 65 |lean..gA|boutScre|
|00000660| 65 6e 20 3d 20 66 61 6c | 73 65 3b 0a 42 6f 6f 6c |en = fal|se;.Bool|
|00000670| 65 61 6e 09 09 67 57 69 | 6e 53 63 72 65 65 6e 20 |ean..gWi|nScreen |
|00000680| 3d 20 66 61 6c 73 65 3b | 0a 0a 2f 2f 47 57 6f 72 |= false;|..//GWor|
|00000690| 6c 64 50 74 72 73 20 66 | 6f 72 20 69 6d 61 67 65 |ldPtrs f|or image|
|000006a0| 73 0a 47 57 6f 72 6c 64 | 50 74 72 20 09 77 6f 72 |s.GWorld|Ptr .wor|
|000006b0| 6b 4d 61 70 50 74 72 3b | 0a 47 57 6f 72 6c 64 50 |kMapPtr;|.GWorldP|
|000006c0| 74 72 20 09 67 61 6d 65 | 53 63 72 65 65 6e 50 74 |tr .game|ScreenPt|
|000006d0| 72 3b 0a 47 57 6f 72 6c | 64 50 74 72 20 09 62 61 |r;.GWorl|dPtr .ba|
|000006e0| 6c 6c 50 74 72 3b 0a 47 | 57 6f 72 6c 64 50 74 72 |llPtr;.G|WorldPtr|
|000006f0| 20 09 70 61 64 64 6c 65 | 50 74 72 3b 0a 47 57 6f | .paddle|Ptr;.GWo|
|00000700| 72 6c 64 50 74 72 20 09 | 72 65 64 42 72 69 63 6b |rldPtr .|redBrick|
|00000710| 50 74 72 3b 0a 47 57 6f | 72 6c 64 50 74 72 20 09 |Ptr;.GWo|rldPtr .|
|00000720| 67 72 65 65 6e 42 72 69 | 63 6b 50 74 72 3b 0a 47 |greenBri|ckPtr;.G|
|00000730| 57 6f 72 6c 64 50 74 72 | 20 09 62 6c 75 65 42 72 |WorldPtr| .blueBr|
|00000740| 69 63 6b 50 74 72 3b 0a | 47 57 6f 72 6c 64 50 74 |ickPtr;.|GWorldPt|
|00000750| 72 20 09 70 61 75 73 65 | 50 74 72 3b 0a 47 57 6f |r .pause|Ptr;.GWo|
|00000760| 72 6c 64 50 74 72 20 09 | 72 65 64 4e 75 6d 62 65 |rldPtr .|redNumbe|
|00000770| 72 73 50 74 72 3b 0a 47 | 57 6f 72 6c 64 50 74 72 |rsPtr;.G|WorldPtr|
|00000780| 20 09 62 6c 75 65 4e 75 | 6d 62 65 72 73 50 74 72 | .blueNu|mbersPtr|
|00000790| 3b 0a 47 57 6f 72 6c 64 | 50 74 72 20 09 67 72 65 |;.GWorld|Ptr .gre|
|000007a0| 79 4e 75 6d 62 65 72 73 | 50 74 72 3b 0a 47 57 6f |yNumbers|Ptr;.GWo|
|000007b0| 72 6c 64 50 74 72 20 09 | 6c 65 76 65 6c 53 69 67 |rldPtr .|levelSig|
|000007c0| 6e 50 74 72 3b 0a 47 57 | 6f 72 6c 64 50 74 72 20 |nPtr;.GW|orldPtr |
|000007d0| 09 72 65 61 64 79 53 69 | 67 6e 50 74 72 3b 0a 47 |.readySi|gnPtr;.G|
|000007e0| 57 6f 72 6c 64 50 74 72 | 20 09 67 61 6d 65 4f 76 |WorldPtr| .gameOv|
|000007f0| 65 72 53 69 67 6e 50 74 | 72 3b 0a 47 57 6f 72 6c |erSignPt|r;.GWorl|
|00000800| 64 50 74 72 09 73 6f 74 | 68 50 74 72 3b 0a 0a 2f |dPtr.sot|hPtr;../|
|00000810| 2f 50 69 78 4d 61 70 73 | 20 66 6f 72 20 69 6d 61 |/PixMaps| for ima|
|00000820| 67 65 73 0a 50 69 78 4d | 61 70 48 61 6e 64 6c 65 |ges.PixM|apHandle|
|00000830| 20 77 6f 72 6b 4d 61 70 | 50 69 78 3b 0a 50 69 78 | workMap|Pix;.Pix|
|00000840| 4d 61 70 48 61 6e 64 6c | 65 20 67 61 6d 65 53 63 |MapHandl|e gameSc|
|00000850| 72 65 65 6e 50 69 78 3b | 0a 50 69 78 4d 61 70 48 |reenPix;|.PixMapH|
|00000860| 61 6e 64 6c 65 20 70 61 | 64 64 6c 65 50 69 78 3b |andle pa|ddlePix;|
|00000870| 0a 50 69 78 4d 61 70 48 | 61 6e 64 6c 65 20 62 61 |.PixMapH|andle ba|
|00000880| 6c 6c 50 69 78 3b 0a 50 | 69 78 4d 61 70 48 61 6e |llPix;.P|ixMapHan|
|00000890| 64 6c 65 20 72 65 64 42 | 72 69 63 6b 50 69 78 3b |dle redB|rickPix;|
|000008a0| 0a 50 69 78 4d 61 70 48 | 61 6e 64 6c 65 20 67 72 |.PixMapH|andle gr|
|000008b0| 65 65 6e 42 72 69 63 6b | 50 69 78 3b 0a 50 69 78 |eenBrick|Pix;.Pix|
|000008c0| 4d 61 70 48 61 6e 64 6c | 65 20 62 6c 75 65 42 72 |MapHandl|e blueBr|
|000008d0| 69 63 6b 50 69 78 3b 0a | 50 69 78 4d 61 70 48 61 |ickPix;.|PixMapHa|
|000008e0| 6e 64 6c 65 20 70 61 75 | 73 65 50 69 78 3b 0a 50 |ndle pau|sePix;.P|
|000008f0| 69 78 4d 61 70 48 61 6e | 64 6c 65 20 72 65 64 4e |ixMapHan|dle redN|
|00000900| 75 6d 62 65 72 73 50 69 | 78 3b 0a 50 69 78 4d 61 |umbersPi|x;.PixMa|
|00000910| 70 48 61 6e 64 6c 65 20 | 62 6c 75 65 4e 75 6d 62 |pHandle |blueNumb|
|00000920| 65 72 73 50 69 78 3b 0a | 50 69 78 4d 61 70 48 61 |ersPix;.|PixMapHa|
|00000930| 6e 64 6c 65 20 67 72 65 | 79 4e 75 6d 62 65 72 73 |ndle gre|yNumbers|
|00000940| 50 69 78 3b 0a 50 69 78 | 4d 61 70 48 61 6e 64 6c |Pix;.Pix|MapHandl|
|00000950| 65 20 6c 65 76 65 6c 53 | 69 67 6e 50 69 78 3b 0a |e levelS|ignPix;.|
|00000960| 50 69 78 4d 61 70 48 61 | 6e 64 6c 65 20 72 65 61 |PixMapHa|ndle rea|
|00000970| 64 79 53 69 67 6e 50 69 | 78 3b 0a 50 69 78 4d 61 |dySignPi|x;.PixMa|
|00000980| 70 48 61 6e 64 6c 65 20 | 67 61 6d 65 4f 76 65 72 |pHandle |gameOver|
|00000990| 53 69 67 6e 50 69 78 3b | 0a 50 69 78 4d 61 70 48 |SignPix;|.PixMapH|
|000009a0| 61 6e 64 6c 65 20 6c 65 | 74 74 65 72 73 50 69 78 |andle le|ttersPix|
|000009b0| 3b 0a 50 69 78 4d 61 70 | 48 61 6e 64 6c 65 20 73 |;.PixMap|Handle s|
|000009c0| 6f 74 68 50 69 78 3b 0a | 0a 50 69 63 48 61 6e 64 |othPix;.|.PicHand|
|000009d0| 6c 65 20 73 74 61 72 74 | 55 70 50 69 63 3b 0a 0a |le start|UpPic;..|
|000009e0| 53 6e 64 43 68 61 6e 6e | 65 6c 50 74 72 20 67 61 |SndChann|elPtr ga|
|000009f0| 6d 65 53 6e 64 43 68 61 | 6e 6e 65 6c 3b 0a 53 6e |meSndCha|nnel;.Sn|
|00000a00| 64 43 68 61 6e 6e 65 6c | 50 74 72 20 6d 75 73 69 |dChannel|Ptr musi|
|00000a10| 63 43 68 61 6e 6e 65 6c | 3b 0a 0a 2f 2f 73 6f 75 |cChannel|;..//sou|
|00000a20| 6e 64 73 0a 48 61 6e 64 | 6c 65 20 62 69 70 53 6e |nds.Hand|le bipSn|
|00000a30| 64 3b 0a 48 61 6e 64 6c | 65 20 62 6f 70 53 6e 64 |d;.Handl|e bopSnd|
|00000a40| 3b 0a 48 61 6e 64 6c 65 | 20 62 72 65 61 6b 53 6e |;.Handle| breakSn|
|00000a50| 64 3b 0a 48 61 6e 64 6c | 65 20 72 65 61 64 79 53 |d;.Handl|e readyS|
|00000a60| 6e 64 3b 0a 48 61 6e 64 | 6c 65 20 64 65 61 74 68 |nd;.Hand|le death|
|00000a70| 53 6e 64 3b 0a 48 61 6e | 64 6c 65 20 67 61 6d 65 |Snd;.Han|dle game|
|00000a80| 4f 76 65 72 53 6e 64 3b | 0a 48 61 6e 64 6c 65 20 |OverSnd;|.Handle |
|00000a90| 70 61 75 73 65 64 53 6e | 64 3b 0a 48 61 6e 64 6c |pausedSn|d;.Handl|
|00000aa0| 65 20 6e 65 77 4c 69 66 | 65 53 6e 64 3b 0a 48 61 |e newLif|eSnd;.Ha|
|00000ab0| 6e 64 6c 65 20 6d 75 73 | 69 63 53 6e 64 3b 0a 48 |ndle mus|icSnd;.H|
|00000ac0| 61 6e 64 6c 65 20 73 6f | 74 68 53 6e 64 3b 0a 0a |andle so|thSnd;..|
|00000ad0| 2f 2f 63 6f 6c 6f 72 73 | 0a 52 47 42 43 6f 6c 6f |//colors|.RGBColo|
|00000ae0| 72 20 77 68 69 74 65 43 | 6f 6c 6f 75 72 20 3d 20 |r whiteC|olour = |
|00000af0| 7b 36 35 35 33 30 2c 20 | 36 35 35 33 30 2c 20 36 |{65530, |65530, 6|
|00000b00| 35 35 33 30 7d 3b 0a 52 | 47 42 43 6f 6c 6f 72 20 |5530};.R|GBColor |
|00000b10| 62 6c 61 63 6b 43 6f 6c | 6f 75 72 20 3d 20 7b 30 |blackCol|our = {0|
|00000b20| 2c 20 30 2c 20 30 7d 3b | 0a 0a 2f 2f 72 65 63 74 |, 0, 0};|..//rect|
|00000b30| 73 20 74 6f 20 65 72 61 | 73 65 20 77 68 65 6e 20 |s to era|se when |
|00000b40| 63 6c 65 61 72 69 6e 67 | 20 67 61 6d 65 20 73 63 |clearing| game sc|
|00000b50| 72 65 65 6e 0a 52 65 63 | 74 20 61 63 74 69 6f 6e |reen.Rec|t action|
|00000b60| 52 65 63 74 20 3d 20 7b | 31 38 2c 20 31 39 2c 20 |Rect = {|18, 19, |
|00000b70| 34 35 38 2c 20 34 37 39 | 7d 3b 0a 52 65 63 74 20 |458, 479|};.Rect |
|00000b80| 73 63 6f 72 65 52 65 63 | 74 20 3d 20 7b 37 36 2c |scoreRec|t = {76,|
|00000b90| 20 35 32 37 2c 20 39 31 | 2c 20 35 38 36 7d 3b 0a | 527, 91|, 586};.|
|00000ba0| 52 65 63 74 20 6c 65 76 | 65 6c 52 65 63 74 20 3d |Rect lev|elRect =|
|00000bb0| 20 7b 31 36 35 2c 20 35 | 35 31 2c 20 31 38 30 2c | {165, 5|51, 180,|
|00000bc0| 20 35 37 34 7d 3b 0a 0a | 52 65 63 74 20 73 63 72 | 574};..|Rect scr|
|00000bd0| 65 65 6e 52 65 63 74 20 | 3d 20 7b 20 30 2c 20 30 |eenRect |= { 0, 0|
|00000be0| 2c 20 34 38 30 2c 20 36 | 34 30 20 7d 3b 0a 0a 52 |, 480, 6|40 };..R|
|00000bf0| 65 63 74 20 70 61 64 64 | 6c 65 52 65 63 74 20 3d |ect padd|leRect =|
|00000c00| 20 20 7b 33 37 39 2c 20 | 33 30 2c 20 33 39 38 2c | {379, |30, 398,|
|00000c10| 20 31 32 32 7d 3b 0a 52 | 65 63 74 20 6f 6c 64 50 | 122};.R|ect oldP|
|00000c20| 61 64 64 6c 65 52 65 63 | 74 3b 0a 52 65 63 74 20 |addleRec|t;.Rect |
|00000c30| 62 61 6c 6c 52 65 63 74 | 20 3d 20 7b 33 34 33 2c |ballRect| = {343,|
|00000c40| 20 32 32 30 2c 20 33 36 | 30 2c 20 32 33 37 7d 3b | 220, 36|0, 237};|
|00000c50| 0a 52 65 63 74 20 6f 6c | 64 42 61 6c 6c 52 65 63 |.Rect ol|dBallRec|
|00000c60| 74 3b 0a 52 65 63 74 20 | 62 72 69 63 6b 55 70 64 |t;.Rect |brickUpd|
|00000c70| 61 74 65 52 65 63 74 73 | 5b 6b 4d 61 78 42 72 69 |ateRects|[kMaxBri|
|00000c80| 63 6b 52 65 63 74 73 5d | 3b 2f 2a 73 68 6f 75 6c |ckRects]|;/*shoul|
|00000c90| 64 20 72 65 61 6c 6c 79 | 20 62 65 20 34 20 62 75 |d really| be 4 bu|
|00000ca0| 74 20 6a 75 73 74 20 69 | 6e 20 63 61 73 65 2a 2f |t just i|n case*/|
|00000cb0| 0a 0a 50 6f 69 6e 74 20 | 62 61 6c 6c 56 65 6c 6f |..Point |ballVelo|
|00000cc0| 63 69 74 79 20 3d 20 7b | 31 37 2c 20 30 7d 3b 0a |city = {|17, 0};.|
|00000cd0| 42 6f 6f 6c 65 61 6e 20 | 62 61 6c 6c 44 6f 63 6b |Boolean |ballDock|
|00000ce0| 65 64 3b 0a 73 68 6f 72 | 74 20 6d 6f 76 65 6d 65 |ed;.shor|t moveme|
|00000cf0| 6e 74 3b 0a 73 68 6f 72 | 74 20 6c 65 76 65 6c 3b |nt;.shor|t level;|
|00000d00| 0a 73 68 6f 72 74 20 62 | 72 69 63 6b 73 4c 65 66 |.short b|ricksLef|
|00000d10| 74 3b 0a 6c 6f 6e 67 20 | 73 63 6f 72 65 3b 0a 6c |t;.long |score;.l|
|00000d20| 6f 6e 67 20 68 69 53 63 | 6f 72 65 3b 0a 73 68 6f |ong hiSc|ore;.sho|
|00000d30| 72 74 20 6c 69 76 65 73 | 3b 0a 73 68 6f 72 74 20 |rt lives|;.short |
|00000d40| 6d 61 78 48 53 70 65 65 | 64 3b 0a 0a 73 68 6f 72 |maxHSpee|d;..shor|
|00000d50| 74 20 62 72 69 63 6b 41 | 72 72 61 79 5b 31 32 5d |t brickA|rray[12]|
|00000d60| 5b 31 30 5d 3b 0a 0a 0a | 0a 69 6e 74 20 6d 61 69 |[10];...|.int mai|
|00000d70| 6e 20 28 76 6f 69 64 29 | 0a 7b 0a 09 45 76 65 6e |n (void)|.{..Even|
|00000d80| 74 52 65 63 6f 72 64 20 | 74 68 65 45 76 65 6e 74 |tRecord |theEvent|
|00000d90| 3b 0a 09 52 65 63 74 20 | 66 75 6c 6c 53 63 72 65 |;..Rect |fullScre|
|00000da0| 65 6e 52 65 63 74 20 3d | 20 7b 30 2c 20 30 2c 20 |enRect =| {0, 0, |
|00000db0| 34 38 30 2c 20 36 34 30 | 7d 3b 0a 20 20 20 20 20 |480, 640|};. |
|00000dc0| 20 20 20 52 65 63 74 20 | 63 65 6e 74 65 72 52 65 | Rect |centerRe|
|00000dd0| 63 74 3b 0a 20 20 20 20 | 20 20 20 0a 20 20 20 20 |ct;. | . |
|00000de0| 20 20 20 20 2f 2f 6c 6f | 61 64 20 74 68 65 20 70 | //lo|ad the p|
|00000df0| 69 63 73 20 74 6f 20 47 | 57 6f 72 6c 64 0a 09 77 |ics to G|World..w|
|00000e00| 6f 72 6b 4d 61 70 50 74 | 72 20 3d 20 4c 6f 61 64 |orkMapPt|r = Load|
|00000e10| 50 69 63 54 6f 47 57 6f | 72 6c 64 28 31 33 31 29 |PicToGWo|rld(131)|
|00000e20| 3b 0a 09 67 61 6d 65 53 | 63 72 65 65 6e 50 74 72 |;..gameS|creenPtr|
|00000e30| 20 3d 20 4c 6f 61 64 50 | 69 63 54 6f 47 57 6f 72 | = LoadP|icToGWor|
|00000e40| 6c 64 28 31 33 30 29 3b | 0a 09 62 61 6c 6c 50 74 |ld(130);|..ballPt|
|00000e50| 72 20 3d 20 4c 6f 61 64 | 50 69 63 54 6f 47 57 6f |r = Load|PicToGWo|
|00000e60| 72 6c 64 28 39 39 38 29 | 3b 0a 09 70 61 64 64 6c |rld(998)|;..paddl|
|00000e70| 65 50 74 72 20 3d 20 4c | 6f 61 64 50 69 63 54 6f |ePtr = L|oadPicTo|
|00000e80| 47 57 6f 72 6c 64 28 39 | 39 39 29 3b 0a 09 72 65 |GWorld(9|99);..re|
|00000e90| 64 42 72 69 63 6b 50 74 | 72 20 3d 20 4c 6f 61 64 |dBrickPt|r = Load|
|00000ea0| 50 69 63 54 6f 47 57 6f | 72 6c 64 28 31 30 30 30 |PicToGWo|rld(1000|
|00000eb0| 29 3b 0a 09 67 72 65 65 | 6e 42 72 69 63 6b 50 74 |);..gree|nBrickPt|
|00000ec0| 72 20 3d 20 4c 6f 61 64 | 50 69 63 54 6f 47 57 6f |r = Load|PicToGWo|
|00000ed0| 72 6c 64 28 31 30 30 31 | 29 3b 0a 09 62 6c 75 65 |rld(1001|);..blue|
|00000ee0| 42 72 69 63 6b 50 74 72 | 20 3d 20 4c 6f 61 64 50 |BrickPtr| = LoadP|
|00000ef0| 69 63 54 6f 47 57 6f 72 | 6c 64 28 31 30 30 32 29 |icToGWor|ld(1002)|
|00000f00| 3b 0a 09 70 61 75 73 65 | 50 74 72 20 3d 20 4c 6f |;..pause|Ptr = Lo|
|00000f10| 61 64 50 69 63 54 6f 47 | 57 6f 72 6c 64 28 31 30 |adPicToG|World(10|
|00000f20| 35 30 29 3b 0a 09 72 65 | 64 4e 75 6d 62 65 72 73 |50);..re|dNumbers|
|00000f30| 50 74 72 20 3d 20 4c 6f | 61 64 50 69 63 54 6f 47 |Ptr = Lo|adPicToG|
|00000f40| 57 6f 72 6c 64 28 31 31 | 30 30 29 3b 0a 09 62 6c |World(11|00);..bl|
|00000f50| 75 65 4e 75 6d 62 65 72 | 73 50 74 72 20 3d 20 4c |ueNumber|sPtr = L|
|00000f60| 6f 61 64 50 69 63 54 6f | 47 57 6f 72 6c 64 28 31 |oadPicTo|GWorld(1|
|00000f70| 31 30 31 29 3b 0a 09 67 | 72 65 79 4e 75 6d 62 65 |101);..g|reyNumbe|
|00000f80| 72 73 50 74 72 20 3d 20 | 4c 6f 61 64 50 69 63 54 |rsPtr = |LoadPicT|
|00000f90| 6f 47 57 6f 72 6c 64 28 | 31 31 30 32 29 3b 0a 09 |oGWorld(|1102);..|
|00000fa0| 6c 65 76 65 6c 53 69 67 | 6e 50 74 72 20 3d 20 4c |levelSig|nPtr = L|
|00000fb0| 6f 61 64 50 69 63 54 6f | 47 57 6f 72 6c 64 28 32 |oadPicTo|GWorld(2|
|00000fc0| 30 30 30 29 3b 0a 09 72 | 65 61 64 79 53 69 67 6e |000);..r|eadySign|
|00000fd0| 50 74 72 20 3d 20 4c 6f | 61 64 50 69 63 54 6f 47 |Ptr = Lo|adPicToG|
|00000fe0| 57 6f 72 6c 64 28 32 30 | 35 30 29 3b 0a 09 67 61 |World(20|50);..ga|
|00000ff0| 6d 65 4f 76 65 72 53 69 | 67 6e 50 74 72 20 3d 20 |meOverSi|gnPtr = |
|00001000| 4c 6f 61 64 50 69 63 54 | 6f 47 57 6f 72 6c 64 28 |LoadPicT|oGWorld(|
|00001010| 32 31 30 30 29 3b 0a 20 | 20 20 20 20 20 20 20 73 |2100);. | s|
|00001020| 6f 74 68 50 74 72 20 3d | 20 4c 6f 61 64 50 69 63 |othPtr =| LoadPic|
|00001030| 54 6f 47 57 6f 72 6c 64 | 28 34 30 30 30 29 3b 0a |ToGWorld|(4000);.|
|00001040| 09 0a 20 20 20 20 20 20 | 20 20 2f 2f 67 65 74 20 |.. | //get |
|00001050| 50 69 78 4d 61 70 48 61 | 6e 64 6c 65 73 20 66 6f |PixMapHa|ndles fo|
|00001060| 72 20 74 68 65 20 47 57 | 6f 72 6c 64 73 0a 09 77 |r the GW|orlds..w|
|00001070| 6f 72 6b 4d 61 70 50 69 | 78 20 3d 20 47 65 74 47 |orkMapPi|x = GetG|
|00001080| 57 6f 72 6c 64 50 69 78 | 4d 61 70 28 77 6f 72 6b |WorldPix|Map(work|
|00001090| 4d 61 70 50 74 72 29 3b | 0a 09 67 61 6d 65 53 63 |MapPtr);|..gameSc|
|000010a0| 72 65 65 6e 50 69 78 20 | 3d 20 47 65 74 47 57 6f |reenPix |= GetGWo|
|000010b0| 72 6c 64 50 69 78 4d 61 | 70 28 67 61 6d 65 53 63 |rldPixMa|p(gameSc|
|000010c0| 72 65 65 6e 50 74 72 29 | 3b 0a 09 62 61 6c 6c 50 |reenPtr)|;..ballP|
|000010d0| 69 78 20 3d 20 47 65 74 | 47 57 6f 72 6c 64 50 69 |ix = Get|GWorldPi|
|000010e0| 78 4d 61 70 28 62 61 6c | 6c 50 74 72 29 3b 0a 09 |xMap(bal|lPtr);..|
|000010f0| 70 61 64 64 6c 65 50 69 | 78 20 3d 20 47 65 74 47 |paddlePi|x = GetG|
|00001100| 57 6f 72 6c 64 50 69 78 | 4d 61 70 28 70 61 64 64 |WorldPix|Map(padd|
|00001110| 6c 65 50 74 72 29 3b 0a | 09 72 65 64 42 72 69 63 |lePtr);.|.redBric|
|00001120| 6b 50 69 78 20 3d 20 47 | 65 74 47 57 6f 72 6c 64 |kPix = G|etGWorld|
|00001130| 50 69 78 4d 61 70 28 72 | 65 64 42 72 69 63 6b 50 |PixMap(r|edBrickP|
|00001140| 74 72 29 3b 0a 09 67 72 | 65 65 6e 42 72 69 63 6b |tr);..gr|eenBrick|
|00001150| 50 69 78 20 3d 20 47 65 | 74 47 57 6f 72 6c 64 50 |Pix = Ge|tGWorldP|
|00001160| 69 78 4d 61 70 28 67 72 | 65 65 6e 42 72 69 63 6b |ixMap(gr|eenBrick|
|00001170| 50 74 72 29 3b 0a 09 62 | 6c 75 65 42 72 69 63 6b |Ptr);..b|lueBrick|
|00001180| 50 69 78 20 3d 20 47 65 | 74 47 57 6f 72 6c 64 50 |Pix = Ge|tGWorldP|
|00001190| 69 78 4d 61 70 28 62 6c | 75 65 42 72 69 63 6b 50 |ixMap(bl|ueBrickP|
|000011a0| 74 72 29 3b 0a 09 70 61 | 75 73 65 50 69 78 20 3d |tr);..pa|usePix =|
|000011b0| 20 47 65 74 47 57 6f 72 | 6c 64 50 69 78 4d 61 70 | GetGWor|ldPixMap|
|000011c0| 28 70 61 75 73 65 50 74 | 72 29 3b 0a 09 72 65 64 |(pausePt|r);..red|
|000011d0| 4e 75 6d 62 65 72 73 50 | 69 78 20 3d 20 47 65 74 |NumbersP|ix = Get|
|000011e0| 47 57 6f 72 6c 64 50 69 | 78 4d 61 70 28 72 65 64 |GWorldPi|xMap(red|
|000011f0| 4e 75 6d 62 65 72 73 50 | 74 72 29 3b 0a 09 62 6c |NumbersP|tr);..bl|
|00001200| 75 65 4e 75 6d 62 65 72 | 73 50 69 78 20 3d 20 47 |ueNumber|sPix = G|
|00001210| 65 74 47 57 6f 72 6c 64 | 50 69 78 4d 61 70 28 62 |etGWorld|PixMap(b|
|00001220| 6c 75 65 4e 75 6d 62 65 | 72 73 50 74 72 29 3b 0a |lueNumbe|rsPtr);.|
|00001230| 09 67 72 65 79 4e 75 6d | 62 65 72 73 50 69 78 20 |.greyNum|bersPix |
|00001240| 3d 20 47 65 74 47 57 6f | 72 6c 64 50 69 78 4d 61 |= GetGWo|rldPixMa|
|00001250| 70 28 67 72 65 79 4e 75 | 6d 62 65 72 73 50 74 72 |p(greyNu|mbersPtr|
|00001260| 29 3b 0a 09 6c 65 76 65 | 6c 53 69 67 6e 50 69 78 |);..leve|lSignPix|
|00001270| 20 3d 20 47 65 74 47 57 | 6f 72 6c 64 50 69 78 4d | = GetGW|orldPixM|
|00001280| 61 70 28 6c 65 76 65 6c | 53 69 67 6e 50 74 72 29 |ap(level|SignPtr)|
|00001290| 3b 0a 09 72 65 61 64 79 | 53 69 67 6e 50 69 78 20 |;..ready|SignPix |
|000012a0| 3d 20 47 65 74 47 57 6f | 72 6c 64 50 69 78 4d 61 |= GetGWo|rldPixMa|
|000012b0| 70 28 72 65 61 64 79 53 | 69 67 6e 50 74 72 29 3b |p(readyS|ignPtr);|
|000012c0| 0a 09 67 61 6d 65 4f 76 | 65 72 53 69 67 6e 50 69 |..gameOv|erSignPi|
|000012d0| 78 20 3d 20 47 65 74 47 | 57 6f 72 6c 64 50 69 78 |x = GetG|WorldPix|
|000012e0| 4d 61 70 28 67 61 6d 65 | 4f 76 65 72 53 69 67 6e |Map(game|OverSign|
|000012f0| 50 74 72 29 3b 0a 20 20 | 20 20 20 20 20 20 73 6f |Ptr);. | so|
|00001300| 74 68 50 69 78 20 3d 20 | 47 65 74 47 57 6f 72 6c |thPix = |GetGWorl|
|00001310| 64 50 69 78 4d 61 70 28 | 73 6f 74 68 50 74 72 29 |dPixMap(|sothPtr)|
|00001320| 3b 0a 09 0a 20 20 20 20 | 20 20 20 20 2f 2f 69 6e |;... | //in|
|00001330| 69 74 20 73 74 75 66 66 | 0a 20 20 20 20 20 20 20 |it stuff|. |
|00001340| 20 49 6e 69 74 43 75 72 | 73 6f 72 28 29 3b 0a 09 | InitCur|sor();..|
|00001350| 46 6c 75 73 68 45 76 65 | 6e 74 73 28 65 76 65 72 |FlushEve|nts(ever|
|00001360| 79 45 76 65 6e 74 2c 20 | 30 29 3b 0a 20 20 20 20 |yEvent, |0);. |
|00001370| 20 20 20 20 0a 20 20 20 | 20 20 20 20 20 2f 2f 69 | . | //i|
|00001380| 6e 69 74 69 61 6c 69 7a | 65 20 61 70 70 6c 65 20 |nitializ|e apple |
|00001390| 65 76 65 6e 74 20 68 61 | 6e 64 6c 69 6e 67 0a 20 |event ha|ndling. |
|000013a0| 20 20 20 20 20 20 20 41 | 70 70 6c 65 45 76 65 6e | A|ppleEven|
|000013b0| 74 49 6e 69 74 28 29 3b | 0a 20 20 20 20 20 20 20 |tInit();|. |
|000013c0| 20 0a 20 20 20 20 20 20 | 20 20 2f 2f 6c 6f 61 64 | . | //load|
|000013d0| 20 6d 65 6e 75 73 20 66 | 72 6f 6d 20 72 73 72 63 | menus f|rom rsrc|
|000013e0| 0a 09 61 70 70 6c 69 63 | 61 74 69 6f 6e 4d 65 6e |..applic|ationMen|
|000013f0| 75 20 3d 20 47 65 74 4d | 65 6e 75 28 31 30 30 30 |u = GetM|enu(1000|
|00001400| 29 3b 0a 09 66 69 6c 65 | 4d 65 6e 75 20 3d 20 47 |);..file|Menu = G|
|00001410| 65 74 4d 65 6e 75 28 31 | 30 30 31 29 3b 0a 20 20 |etMenu(1|001);. |
|00001420| 20 20 20 20 20 20 6f 70 | 74 69 6f 6e 73 4d 65 6e | op|tionsMen|
|00001430| 75 20 3d 20 47 65 74 4d | 65 6e 75 28 31 30 30 32 |u = GetM|enu(1002|
|00001440| 29 3b 0a 09 0a 20 20 20 | 20 20 20 20 20 2f 2f 69 |);... | //i|
|00001450| 6e 73 65 72 74 20 6d 65 | 6e 75 73 0a 09 49 6e 73 |nsert me|nus..Ins|
|00001460| 65 72 74 4d 65 6e 75 28 | 61 70 70 6c 69 63 61 74 |ertMenu(|applicat|
|00001470| 69 6f 6e 4d 65 6e 75 2c | 20 30 29 3b 0a 09 49 6e |ionMenu,| 0);..In|
|00001480| 73 65 72 74 4d 65 6e 75 | 28 66 69 6c 65 4d 65 6e |sertMenu|(fileMen|
|00001490| 75 2c 20 30 29 3b 0a 20 | 20 20 20 20 20 20 20 49 |u, 0);. | I|
|000014a0| 6e 73 65 72 74 4d 65 6e | 75 28 6f 70 74 69 6f 6e |nsertMen|u(option|
|000014b0| 73 4d 65 6e 75 2c 20 30 | 29 3b 0a 20 20 20 20 20 |sMenu, 0|);. |
|000014c0| 20 20 20 0a 20 20 20 20 | 20 20 20 20 2f 2f 70 75 | . | //pu|
|000014d0| 74 20 63 68 65 63 6b 6d | 61 72 6b 73 20 6f 6e 20 |t checkm|arks on |
|000014e0| 6d 65 6e 75 20 69 74 65 | 6d 73 20 69 6e 20 6f 70 |menu ite|ms in op|
|000014f0| 74 69 6f 6e 73 2c 20 73 | 69 6e 63 65 20 74 68 65 |tions, s|ince the|
|00001500| 79 27 72 65 20 6f 6e 20 | 62 79 20 64 65 66 61 75 |y're on |by defau|
|00001510| 6c 74 20 77 68 65 6e 20 | 74 68 65 20 67 61 6d 65 |lt when |the game|
|00001520| 20 73 74 61 72 74 73 0a | 20 20 20 20 20 20 20 20 | starts.| |
|00001530| 43 68 65 63 6b 4d 65 6e | 75 49 74 65 6d 28 6f 70 |CheckMen|uItem(op|
|00001540| 74 69 6f 6e 73 4d 65 6e | 75 2c 20 31 2c 20 31 29 |tionsMen|u, 1, 1)|
|00001550| 3b 0a 20 20 20 20 20 20 | 20 20 43 68 65 63 6b 4d |;. | CheckM|
|00001560| 65 6e 75 49 74 65 6d 28 | 6f 70 74 69 6f 6e 73 4d |enuItem(|optionsM|
|00001570| 65 6e 75 2c 20 32 2c 20 | 31 29 3b 0a 20 20 20 20 |enu, 2, |1);. |
|00001580| 20 20 20 20 0a 20 20 20 | 20 20 20 20 20 2f 2f 64 | . | //d|
|00001590| 69 73 61 62 6c 65 20 53 | 74 6f 70 20 47 61 6d 65 |isable S|top Game|
|000015a0| 20 6d 65 6e 75 20 69 74 | 65 6d 20 73 69 6e 63 65 | menu it|em since|
|000015b0| 20 77 65 27 72 65 20 6e | 6f 74 20 70 6c 61 79 69 | we're n|ot playi|
|000015c0| 6e 67 20 79 65 74 0a 20 | 20 20 20 20 20 20 20 44 |ng yet. | D|
|000015d0| 69 73 61 62 6c 65 4d 65 | 6e 75 49 74 65 6d 28 66 |isableMe|nuItem(f|
|000015e0| 69 6c 65 4d 65 6e 75 2c | 20 32 29 3b 0a 20 20 20 |ileMenu,| 2);. |
|000015f0| 20 20 20 20 20 0a 20 20 | 20 20 20 20 20 20 2f 2f | . | //|
|00001600| 61 6c 6f 63 61 74 65 20 | 74 68 65 20 73 6f 75 6e |alocate |the soun|
|00001610| 64 20 63 68 61 6e 6e 65 | 6c 0a 09 49 6e 69 74 53 |d channe|l..InitS|
|00001620| 6f 75 6e 64 28 29 3b 0a | 09 0a 20 20 20 20 20 20 |ound();.|.. |
|00001630| 20 20 2f 2f 6c 6f 61 64 | 20 74 68 65 20 73 6f 75 | //load| the sou|
|00001640| 6e 64 73 0a 09 62 69 70 | 53 6e 64 20 3d 20 47 65 |nds..bip|Snd = Ge|
|00001650| 74 52 65 73 6f 75 72 63 | 65 28 27 73 6e 64 20 27 |tResourc|e('snd '|
|00001660| 2c 20 31 30 30 30 29 3b | 0a 09 62 6f 70 53 6e 64 |, 1000);|..bopSnd|
|00001670| 20 3d 20 47 65 74 52 65 | 73 6f 75 72 63 65 28 27 | = GetRe|source('|
|00001680| 73 6e 64 20 27 2c 20 31 | 30 30 31 29 3b 0a 09 62 |snd ', 1|001);..b|
|00001690| 72 65 61 6b 53 6e 64 20 | 3d 20 47 65 74 52 65 73 |reakSnd |= GetRes|
|000016a0| 6f 75 72 63 65 28 27 73 | 6e 64 20 27 2c 20 31 30 |ource('s|nd ', 10|
|000016b0| 30 32 29 3b 0a 09 72 65 | 61 64 79 53 6e 64 20 3d |02);..re|adySnd =|
|000016c0| 20 47 65 74 52 65 73 6f | 75 72 63 65 28 27 73 6e | GetReso|urce('sn|
|000016d0| 64 20 27 2c 20 31 30 30 | 33 29 3b 0a 09 64 65 61 |d ', 100|3);..dea|
|000016e0| 74 68 53 6e 64 20 3d 20 | 47 65 74 52 65 73 6f 75 |thSnd = |GetResou|
|000016f0| 72 63 65 28 27 73 6e 64 | 20 27 2c 20 31 30 30 34 |rce('snd| ', 1004|
|00001700| 29 3b 0a 09 67 61 6d 65 | 4f 76 65 72 53 6e 64 20 |);..game|OverSnd |
|00001710| 3d 20 47 65 74 52 65 73 | 6f 75 72 63 65 28 27 73 |= GetRes|ource('s|
|00001720| 6e 64 20 27 2c 20 31 30 | 30 35 29 3b 0a 09 70 61 |nd ', 10|05);..pa|
|00001730| 75 73 65 64 53 6e 64 20 | 3d 20 47 65 74 52 65 73 |usedSnd |= GetRes|
|00001740| 6f 75 72 63 65 28 27 73 | 6e 64 20 27 2c 20 31 30 |ource('s|nd ', 10|
|00001750| 30 36 29 3b 0a 09 6e 65 | 77 4c 69 66 65 53 6e 64 |06);..ne|wLifeSnd|
|00001760| 20 3d 20 47 65 74 52 65 | 73 6f 75 72 63 65 28 27 | = GetRe|source('|
|00001770| 73 6e 64 20 27 2c 20 31 | 30 30 37 29 3b 0a 09 73 |snd ', 1|007);..s|
|00001780| 6f 74 68 53 6e 64 20 3d | 20 47 65 74 52 65 73 6f |othSnd =| GetReso|
|00001790| 75 72 63 65 28 27 73 6e | 64 20 27 2c 20 31 30 30 |urce('sn|d ', 100|
|000017a0| 38 29 3b 0a 09 6d 75 73 | 69 63 53 6e 64 20 3d 20 |8);..mus|icSnd = |
|000017b0| 47 65 74 52 65 73 6f 75 | 72 63 65 28 27 73 6e 64 |GetResou|rce('snd|
|000017c0| 20 27 2c 20 32 30 30 30 | 29 3b 2f 2f 6c 6f 6f 70 | ', 2000|);//loop|
|000017d0| 20 73 6f 75 6e 64 0a 09 | 0a 09 4c 6f 61 64 53 63 | sound..|..LoadSc|
|000017e0| 6f 72 65 28 29 3b 0a 0a | 09 2f 2f 48 69 64 65 43 |ore();..|.//HideC|
|000017f0| 75 72 73 6f 72 28 29 3b | 0a 09 0a 09 43 65 6e 74 |ursor();|....Cent|
|00001800| 65 72 52 65 63 74 49 6e | 52 65 63 74 28 26 66 75 |erRectIn|Rect(&fu|
|00001810| 6c 6c 53 63 72 65 65 6e | 52 65 63 74 2c 20 26 28 |llScreen|Rect, &(|
|00001820| 2a 2a 47 65 74 4d 61 69 | 6e 44 65 76 69 63 65 28 |**GetMai|nDevice(|
|00001830| 29 29 2e 67 64 52 65 63 | 74 2c 20 26 63 65 6e 74 |)).gdRec|t, &cent|
|00001840| 65 72 52 65 63 74 29 3b | 09 0a 20 20 20 20 20 20 |erRect);|.. |
|00001850| 20 20 0a 20 20 20 20 20 | 20 20 20 2f 2f 63 72 65 | . | //cre|
|00001860| 61 74 65 20 74 68 65 20 | 67 61 6d 65 20 77 69 6e |ate the |game win|
|00001870| 64 6f 77 0a 09 67 61 6d | 65 57 69 6e 64 6f 77 20 |dow..gam|eWindow |
|00001880| 3d 20 4e 65 77 43 57 69 | 6e 64 6f 77 28 6e 69 6c |= NewCWi|ndow(nil|
|00001890| 2c 20 26 63 65 6e 74 65 | 72 52 65 63 74 2c 20 22 |, &cente|rRect, "|
|000018a0| 5c 70 22 2c 20 74 72 75 | 65 2c 20 6e 6f 47 72 6f |\p", tru|e, noGro|
|000018b0| 77 44 6f 63 50 72 6f 63 | 2c 20 67 61 6d 65 57 69 |wDocProc|, gameWi|
|000018c0| 6e 64 6f 77 2c 20 74 72 | 75 65 2c 6e 69 6c 29 3b |ndow, tr|ue,nil);|
|000018d0| 09 0a 09 53 68 6f 77 57 | 69 6e 64 6f 77 28 67 61 |...ShowW|indow(ga|
|000018e0| 6d 65 57 69 6e 64 6f 77 | 29 3b 0a 20 20 20 20 20 |meWindow|);. |
|000018f0| 20 20 20 0a 20 20 20 20 | 20 20 20 20 2f 2f 73 65 | . | //se|
|00001900| 74 20 70 6f 72 74 20 74 | 6f 20 67 61 6d 65 20 77 |t port t|o game w|
|00001910| 69 6e 64 6f 77 2e 20 20 | 20 54 68 65 20 70 6f 72 |indow. | The por|
|00001920| 74 20 69 73 20 6e 6f 74 | 20 63 68 61 6e 67 65 64 |t is not| changed|
|00001930| 20 61 74 20 61 6e 79 20 | 70 6f 69 6e 74 20 61 66 | at any |point af|
|00001940| 74 65 72 20 74 68 69 73 | 0a 09 53 65 74 50 6f 72 |ter this|..SetPor|
|00001950| 74 28 47 65 74 57 69 6e | 64 6f 77 50 6f 72 74 28 |t(GetWin|dowPort(|
|00001960| 67 61 6d 65 57 69 6e 64 | 6f 77 29 29 3b 0a 09 0a |gameWind|ow));...|
|00001970| 09 53 6e 64 50 6c 61 79 | 28 67 61 6d 65 53 6e 64 |.SndPlay|(gameSnd|
|00001980| 43 68 61 6e 6e 65 6c 2c | 20 28 53 6e 64 4c 69 73 |Channel,| (SndLis|
|00001990| 74 48 61 6e 64 6c 65 29 | 73 6f 74 68 53 6e 64 2c |tHandle)|sothSnd,|
|000019a0| 20 74 72 75 65 29 3b 0a | 09 0a 20 20 20 20 20 20 | true);.|.. |
|000019b0| 20 20 2f 2f 77 65 20 6e | 6f 20 6c 6f 6e 67 20 6e | //we n|o long n|
|000019c0| 65 65 64 20 74 68 65 20 | 73 74 61 72 74 75 70 20 |eed the |startup |
|000019d0| 73 6f 75 6e 64 0a 09 52 | 65 6c 65 61 73 65 52 65 |sound..R|eleaseRe|
|000019e0| 73 6f 75 72 63 65 28 73 | 6f 74 68 53 6e 64 29 3b |source(s|othSnd);|
|000019f0| 0a 20 20 20 20 20 20 20 | 20 0a 20 20 20 20 20 20 |. | . |
|00001a00| 20 20 44 72 61 77 4d 65 | 6e 75 42 61 72 28 29 3b | DrawMe|nuBar();|
|00001a10| 0a 09 0a 09 44 72 61 77 | 53 63 72 65 65 6e 28 29 |....Draw|Screen()|
|00001a20| 3b 0a 09 09 0a 09 53 68 | 6f 77 43 75 72 73 6f 72 |;.....Sh|owCursor|
|00001a30| 28 29 3b 0a 09 09 0a 09 | 64 6f 0a 09 7b 09 0a 09 |();.....|do..{...|
|00001a40| 09 69 66 28 67 50 6c 61 | 79 69 6e 67 20 3d 3d 20 |.if(gPla|ying == |
|00001a50| 74 72 75 65 29 0a 09 09 | 7b 0a 09 09 09 6c 6f 6e |true)...|{....lon|
|00001a60| 67 20 74 65 6d 70 54 69 | 63 6b 43 6f 75 6e 74 20 |g tempTi|ckCount |
|00001a70| 3d 20 54 69 63 6b 43 6f | 75 6e 74 28 29 3b 0a 09 |= TickCo|unt();..|
|00001a80| 09 09 0a 09 09 09 45 72 | 61 73 65 57 6f 72 6b 4d |......Er|aseWorkM|
|00001a90| 61 70 52 65 63 74 28 26 | 70 61 64 64 6c 65 52 65 |apRect(&|paddleRe|
|00001aa0| 63 74 29 3b 0a 09 09 09 | 45 72 61 73 65 57 6f 72 |ct);....|EraseWor|
|00001ab0| 6b 4d 61 70 52 65 63 74 | 28 26 62 61 6c 6c 52 65 |kMapRect|(&ballRe|
|00001ac0| 63 74 29 3b 0a 09 09 09 | 0a 09 09 09 4d 6f 76 65 |ct);....|....Move|
|00001ad0| 41 6e 64 44 72 61 77 50 | 61 64 64 6c 65 28 29 3b |AndDrawP|addle();|
|00001ae0| 0a 09 09 09 4d 6f 76 65 | 41 6e 64 44 72 61 77 42 |....Move|AndDrawB|
|00001af0| 61 6c 6c 28 29 3b 0a 09 | 09 09 0a 09 09 09 69 66 |all();..|......if|
|00001b00| 28 67 50 6c 61 79 69 6e | 67 20 3d 3d 20 66 61 6c |(gPlayin|g == fal|
|00001b10| 73 65 29 2f 2f 69 66 20 | 74 68 65 20 70 6c 61 79 |se)//if |the play|
|00001b20| 65 72 20 6a 75 73 74 20 | 6c 6f 73 74 20 68 69 73 |er just |lost his|
|00001b30| 20 66 69 6e 61 6c 20 62 | 61 6c 6c 20 61 6e 64 20 | final b|all and |
|00001b40| 77 65 20 61 72 65 20 68 | 61 6e 64 6c 69 6e 67 20 |we are h|andling |
|00001b50| 65 76 65 6e 74 73 20 74 | 68 65 20 66 6f 6c 6c 6f |events t|he follo|
|00001b60| 77 69 6e 67 20 63 6f 64 | 65 20 73 68 6f 75 6c 64 |wing cod|e should|
|00001b70| 20 6e 6f 74 20 62 65 20 | 65 78 65 63 75 74 65 64 | not be |executed|
|00001b80| 0a 09 09 09 09 63 6f 6e | 74 69 6e 75 65 3b 0a 09 |.....con|tinue;..|
|00001b90| 0a 09 09 09 42 6c 69 74 | 57 68 6f 6c 65 57 6f 72 |....Blit|WholeWor|
|00001ba0| 6b 4d 61 70 54 6f 53 63 | 72 65 65 6e 28 29 3b 0a |kMapToSc|reen();.|
|00001bb0| 09 09 09 09 0a 09 09 09 | 44 72 61 77 53 63 6f 72 |........|DrawScor|
|00001bc0| 65 28 73 63 6f 72 65 29 | 3b 0a 09 09 09 0a 09 09 |e(score)|;.......|
|00001bd0| 09 53 65 72 76 69 63 65 | 4d 75 73 69 63 28 29 3b |.Service|Music();|
|00001be0| 0a 09 09 09 0a 09 09 09 | 43 68 65 63 6b 46 6f 72 |........|CheckFor|
|00001bf0| 4b 65 79 73 28 29 3b 0a | 09 09 09 0a 09 09 09 0a |Keys();.|........|
|00001c00| 09 09 09 64 6f 0a 09 09 | 09 7b 0a 09 09 09 09 57 |...do...|.{.....W|
|00001c10| 61 69 74 4e 65 78 74 45 | 76 65 6e 74 28 65 76 65 |aitNextE|vent(eve|
|00001c20| 72 79 45 76 65 6e 74 2c | 20 26 74 68 65 45 76 65 |ryEvent,| &theEve|
|00001c30| 6e 74 2c 20 30 2c 20 6e | 69 6c 29 3b 0a 09 09 09 |nt, 0, n|il);....|
|00001c40| 0a 09 09 09 09 48 61 6e | 64 6c 65 45 76 65 6e 74 |.....Han|dleEvent|
|00001c50| 28 26 74 68 65 45 76 65 | 6e 74 29 3b 09 09 0a 0a |(&theEve|nt);....|
|00001c60| 09 09 09 7d 0a 09 09 09 | 09 77 68 69 6c 65 28 74 |...}....|.while(t|
|00001c70| 65 6d 70 54 69 63 6b 43 | 6f 75 6e 74 20 2b 20 32 |empTickC|ount + 2|
|00001c80| 20 3e 3d 20 54 69 63 6b | 43 6f 75 6e 74 28 29 29 | >= Tick|Count())|
|00001c90| 3b 0a 09 09 09 0a 09 09 | 7d 0a 09 09 65 6c 73 65 |;.......|}...else|
|00001ca0| 0a 09 09 7b 0a 09 09 09 | 57 61 69 74 4e 65 78 74 |...{....|WaitNext|
|00001cb0| 45 76 65 6e 74 28 65 76 | 65 72 79 45 76 65 6e 74 |Event(ev|eryEvent|
|00001cc0| 2c 20 26 74 68 65 45 76 | 65 6e 74 2c 20 31 30 2c |, &theEv|ent, 10,|
|00001cd0| 20 6e 69 6c 29 3b 0a 09 | 09 09 0a 09 09 09 48 61 | nil);..|......Ha|
|00001ce0| 6e 64 6c 65 45 76 65 6e | 74 28 26 74 68 65 45 76 |ndleEven|t(&theEv|
|00001cf0| 65 6e 74 29 3b 0a 09 09 | 7d 0a 09 7d 20 0a 20 20 |ent);...|}..} . |
|00001d00| 20 20 20 20 20 20 77 68 | 69 6c 65 20 28 21 67 44 | wh|ile (!gD|
|00001d10| 6f 6e 65 29 3b 0a 09 09 | 0a 20 20 20 20 20 20 20 |one);...|. |
|00001d20| 20 53 68 75 74 44 6f 77 | 6e 28 29 3b 0a 20 20 20 | ShutDow|n();. |
|00001d30| 20 20 20 20 20 0a 20 20 | 20 20 20 20 20 20 72 65 | . | re|
|00001d40| 74 75 72 6e 28 30 29 3b | 0a 7d 0a 0a 76 6f 69 64 |turn(0);|.}..void|
|00001d50| 20 48 61 6e 64 6c 65 45 | 76 65 6e 74 28 45 76 65 | HandleE|vent(Eve|
|00001d60| 6e 74 52 65 63 6f 72 64 | 20 2a 74 68 65 45 76 65 |ntRecord| *theEve|
|00001d70| 6e 74 29 0a 7b 0a 09 52 | 65 63 74 20 6e 65 77 47 |nt).{..R|ect newG|
|00001d80| 61 6d 65 52 65 63 74 20 | 3d 20 7b 34 30 31 2c 20 |ameRect |= {401, |
|00001d90| 37 32 2c 20 34 32 36 2c | 20 31 39 35 7d 3b 0a 09 |72, 426,| 195};..|
|00001da0| 52 65 63 74 20 61 62 6f | 75 74 52 65 63 74 20 3d |Rect abo|utRect =|
|00001db0| 20 7b 34 30 33 2c 20 32 | 34 37 2c 20 34 31 38 2c | {403, 2|47, 418,|
|00001dc0| 20 33 34 36 7d 3b 0a 09 | 52 65 63 74 20 71 75 69 | 346};..|Rect qui|
|00001dd0| 74 52 65 63 74 20 3d 20 | 7b 34 30 32 2c 20 33 38 |tRect = |{402, 38|
|00001de0| 35 2c 20 34 32 30 2c 20 | 34 34 35 7d 3b 0a 09 57 |5, 420, |445};..W|
|00001df0| 69 6e 64 6f 77 50 74 72 | 09 68 69 74 57 69 6e 64 |indowPtr|.hitWind|
|00001e00| 6f 77 3b 0a 09 63 68 61 | 72 20 74 68 65 4b 65 79 |ow;..cha|r theKey|
|00001e10| 3b 0a 09 73 68 6f 72 74 | 20 77 69 6e 64 6f 77 50 |;..short| windowP|
|00001e20| 61 72 74 3b 0a 09 50 6f | 69 6e 74 20 6c 6f 63 61 |art;..Po|int loca|
|00001e30| 6c 50 6f 69 6e 74 3b 0a | 09 52 47 42 43 6f 6c 6f |lPoint;.|.RGBColo|
|00001e40| 72 20 67 72 65 79 43 6f | 6c 6f 72 20 3d 20 7b 31 |r greyCo|lor = {1|
|00001e50| 36 30 30 30 2c 20 31 36 | 30 30 30 2c 20 31 36 30 |6000, 16|000, 160|
|00001e60| 30 30 7d 3b 0a 09 0a 09 | 6c 6f 6e 67 20 6d 65 6e |00};....|long men|
|00001e70| 75 43 68 6f 69 63 65 3b | 0a 09 0a 09 43 47 72 61 |uChoice;|....CGra|
|00001e80| 66 50 74 72 20 20 20 20 | 70 6f 72 74 3b 0a 09 0a |fPtr |port;...|
|00001e90| 09 70 6f 72 74 20 3d 20 | 47 65 74 57 69 6e 64 6f |.port = |GetWindo|
|00001ea0| 77 50 6f 72 74 28 67 61 | 6d 65 57 69 6e 64 6f 77 |wPort(ga|meWindow|
|00001eb0| 29 3b 0a 09 0a 09 77 69 | 6e 64 6f 77 50 61 72 74 |);....wi|ndowPart|
|00001ec0| 20 3d 20 46 69 6e 64 57 | 69 6e 64 6f 77 28 74 68 | = FindW|indow(th|
|00001ed0| 65 45 76 65 6e 74 2d 3e | 77 68 65 72 65 2c 20 26 |eEvent->|where, &|
|00001ee0| 68 69 74 57 69 6e 64 6f | 77 29 3b 0a 09 0a 09 0a |hitWindo|w);.....|
|00001ef0| 09 0a 09 0a 09 73 77 69 | 74 63 68 28 74 68 65 45 |.....swi|tch(theE|
|00001f00| 76 65 6e 74 2d 3e 77 68 | 61 74 29 0a 09 7b 0a 09 |vent->wh|at)..{..|
|00001f10| 09 63 61 73 65 20 6d 6f | 75 73 65 44 6f 77 6e 3a |.case mo|useDown:|
|00001f20| 09 09 0a 09 09 09 73 77 | 69 74 63 68 20 28 77 69 |......sw|itch (wi|
|00001f30| 6e 64 6f 77 50 61 72 74 | 29 0a 09 09 09 7b 0a 20 |ndowPart|)....{. |
|00001f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|00001f60| 61 73 65 20 69 6e 47 6f | 41 77 61 79 3a 0a 20 20 |ase inGo|Away:. |
|00001f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f90| 20 20 20 20 20 20 53 68 | 75 74 44 6f 77 6e 28 29 | Sh|utDown()|
|00001fa0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00001fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fc0| 20 20 20 20 20 20 20 20 | 20 20 62 72 65 61 6b 3b | | break;|
|00001fd0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001fe0| 20 20 20 20 20 20 20 20 | 20 0a 09 09 09 09 63 61 | | .....ca|
|00001ff0| 73 65 20 69 6e 4d 65 6e | 75 42 61 72 3a 0a 09 09 |se inMen|uBar:...|
|00002000| 09 09 09 6d 65 6e 75 43 | 68 6f 69 63 65 20 3d 20 |...menuC|hoice = |
|00002010| 4d 65 6e 75 53 65 6c 65 | 63 74 28 74 68 65 45 76 |MenuSele|ct(theEv|
|00002020| 65 6e 74 2d 3e 77 68 65 | 72 65 29 3b 0a 09 09 09 |ent->whe|re);....|
|00002030| 0a 09 09 09 09 09 69 66 | 20 28 6d 65 6e 75 43 68 |......if| (menuCh|
|00002040| 6f 69 63 65 29 0a 09 09 | 09 09 09 7b 0a 09 09 09 |oice)...|...{....|
|00002050| 09 09 09 48 61 6e 64 6c | 65 4d 65 6e 75 43 68 6f |...Handl|eMenuCho|
|00002060| 69 63 65 28 6d 65 6e 75 | 43 68 6f 69 63 65 29 3b |ice(menu|Choice);|
|00002070| 0a 09 09 09 09 09 7d 0a | 09 09 09 09 09 48 69 6c |......}.|.....Hil|
|00002080| 69 74 65 4d 65 6e 75 28 | 30 29 3b 0a 09 09 09 09 |iteMenu(|0);.....|
|00002090| 09 62 72 65 61 6b 3b 0a | 09 09 09 09 09 0a 09 09 |.break;.|........|
|000020a0| 09 09 63 61 73 65 20 69 | 6e 43 6f 6e 74 65 6e 74 |..case i|nContent|
|000020b0| 3a 0a 09 09 09 09 6c 6f | 63 61 6c 50 6f 69 6e 74 |:.....lo|calPoint|
|000020c0| 2e 76 20 3d 20 74 68 65 | 45 76 65 6e 74 2d 3e 77 |.v = the|Event->w|
|000020d0| 68 65 72 65 2e 76 3b 0a | 09 09 09 09 6c 6f 63 61 |here.v;.|....loca|
|000020e0| 6c 50 6f 69 6e 74 2e 68 | 20 3d 20 74 68 65 45 76 |lPoint.h| = theEv|
|000020f0| 65 6e 74 2d 3e 77 68 65 | 72 65 2e 68 3b 0a 09 09 |ent->whe|re.h;...|
|00002100| 09 09 47 6c 6f 62 61 6c | 54 6f 4c 6f 63 61 6c 28 |..Global|ToLocal(|
|00002110| 26 6c 6f 63 61 6c 50 6f | 69 6e 74 29 3b 0a 09 09 |&localPo|int);...|
|00002120| 09 09 0a 09 09 09 09 69 | 66 28 50 74 49 6e 52 65 |.......i|f(PtInRe|
|00002130| 63 74 28 6c 6f 63 61 6c | 50 6f 69 6e 74 2c 20 26 |ct(local|Point, &|
|00002140| 6e 65 77 47 61 6d 65 52 | 65 63 74 29 20 29 0a 09 |newGameR|ect) )..|
|00002150| 09 09 09 7b 0a 09 09 09 | 09 09 42 6f 6f 6c 65 61 |...{....|..Boolea|
|00002160| 6e 20 62 75 74 74 6f 6e | 44 6f 77 6e 20 3d 20 74 |n button|Down = t|
|00002170| 72 75 65 3b 0a 09 09 09 | 09 09 09 09 09 09 0a 09 |rue;....|........|
|00002180| 09 09 09 09 52 47 42 46 | 6f 72 65 43 6f 6c 6f 72 |....RGBF|oreColor|
|00002190| 28 26 67 72 65 79 43 6f | 6c 6f 72 29 3b 0a 09 09 |(&greyCo|lor);...|
|000021a0| 09 09 09 50 65 6e 4d 6f | 64 65 28 73 75 62 50 69 |...PenMo|de(subPi|
|000021b0| 6e 29 3b 0a 09 09 09 09 | 09 50 61 69 6e 74 52 65 |n);.....|.PaintRe|
|000021c0| 63 74 28 26 6e 65 77 47 | 61 6d 65 52 65 63 74 29 |ct(&newG|ameRect)|
|000021d0| 3b 0a 09 09 09 09 09 46 | 6f 72 65 43 6f 6c 6f 72 |;......F|oreColor|
|000021e0| 28 62 6c 61 63 6b 43 6f | 6c 6f 72 29 3b 0a 09 09 |(blackCo|lor);...|
|000021f0| 09 09 09 50 65 6e 4e 6f | 72 6d 61 6c 28 29 3b 0a |...PenNo|rmal();.|
|00002200| 09 09 09 09 09 0a 09 09 | 09 09 09 0a 09 09 09 09 |........|........|
|00002210| 09 0a 09 09 09 09 09 0a | 09 09 09 09 09 64 6f 0a |........|.....do.|
|00002220| 09 09 09 09 09 7b 0a 09 | 09 09 09 09 09 47 65 74 |.....{..|.....Get|
|00002230| 4d 6f 75 73 65 28 26 6c | 6f 63 61 6c 50 6f 69 6e |Mouse(&l|ocalPoin|
|00002240| 74 29 3b 0a 09 09 09 09 | 09 09 0a 09 09 09 09 09 |t);.....|........|
|00002250| 09 69 66 28 50 74 49 6e | 52 65 63 74 28 6c 6f 63 |.if(PtIn|Rect(loc|
|00002260| 61 6c 50 6f 69 6e 74 2c | 20 26 6e 65 77 47 61 6d |alPoint,| &newGam|
|00002270| 65 52 65 63 74 29 20 26 | 26 20 62 75 74 74 6f 6e |eRect) &|& button|
|00002280| 44 6f 77 6e 20 3d 3d 20 | 66 61 6c 73 65 29 0a 09 |Down == |false)..|
|00002290| 09 09 09 09 09 7b 0a 09 | 09 09 09 09 09 09 52 47 |.....{..|......RG|
|000022a0| 42 46 6f 72 65 43 6f 6c | 6f 72 28 26 67 72 65 79 |BForeCol|or(&grey|
|000022b0| 43 6f 6c 6f 72 29 3b 0a | 09 09 09 09 09 09 09 50 |Color);.|.......P|
|000022c0| 65 6e 4d 6f 64 65 28 73 | 75 62 50 69 6e 29 3b 0a |enMode(s|ubPin);.|
|000022d0| 09 09 09 09 09 09 09 50 | 61 69 6e 74 52 65 63 74 |.......P|aintRect|
|000022e0| 28 26 6e 65 77 47 61 6d | 65 52 65 63 74 29 3b 0a |(&newGam|eRect);.|
|000022f0| 09 09 09 09 09 09 09 46 | 6f 72 65 43 6f 6c 6f 72 |.......F|oreColor|
|00002300| 28 62 6c 61 63 6b 43 6f | 6c 6f 72 29 3b 0a 09 09 |(blackCo|lor);...|
|00002310| 09 09 09 09 09 0a 09 09 | 09 09 09 09 09 62 75 74 |........|.....but|
|00002320| 74 6f 6e 44 6f 77 6e 20 | 3d 20 74 72 75 65 3b 0a |tonDown |= true;.|
|00002330| 09 09 09 09 09 09 7d 0a | 09 09 09 09 09 09 0a 09 |......}.|........|
|00002340| 09 09 09 09 09 69 66 28 | 28 21 50 74 49 6e 52 65 |.....if(|(!PtInRe|
|00002350| 63 74 28 6c 6f 63 61 6c | 50 6f 69 6e 74 2c 20 26 |ct(local|Point, &|
|00002360| 6e 65 77 47 61 6d 65 52 | 65 63 74 29 29 20 26 26 |newGameR|ect)) &&|
|00002370| 20 62 75 74 74 6f 6e 44 | 6f 77 6e 20 3d 3d 20 74 | buttonD|own == t|
|00002380| 72 75 65 29 0a 09 09 09 | 09 09 09 7b 0a 09 09 09 |rue)....|...{....|
|00002390| 09 09 09 09 43 6f 70 79 | 42 69 74 73 28 28 42 69 |....Copy|Bits((Bi|
|000023a0| 74 4d 61 70 20 2a 29 2a | 67 61 6d 65 53 63 72 65 |tMap *)*|gameScre|
|000023b0| 65 6e 50 69 78 2c 20 47 | 65 74 50 6f 72 74 42 69 |enPix, G|etPortBi|
|000023c0| 74 4d 61 70 46 6f 72 43 | 6f 70 79 42 69 74 73 28 |tMapForC|opyBits(|
|000023d0| 70 6f 72 74 29 2c 20 26 | 6e 65 77 47 61 6d 65 52 |port), &|newGameR|
|000023e0| 65 63 74 2f 2a 73 72 63 | 2a 2f 2c 20 26 6e 65 77 |ect/*src|*/, &new|
|000023f0| 47 61 6d 65 52 65 63 74 | 2f 2a 64 65 73 74 2a 2f |GameRect|/*dest*/|
|00002400| 2c 20 73 72 63 43 6f 70 | 79 2c 20 6e 69 6c 29 3b |, srcCop|y, nil);|
|00002410| 0a 09 09 09 09 09 09 09 | 62 75 74 74 6f 6e 44 6f |........|buttonDo|
|00002420| 77 6e 20 3d 20 66 61 6c | 73 65 3b 0a 09 09 09 09 |wn = fal|se;.....|
|00002430| 09 09 7d 20 0a 09 09 09 | 09 09 09 0a 09 09 09 09 |..} ....|........|
|00002440| 09 7d 20 77 68 69 6c 65 | 28 57 61 69 74 4d 6f 75 |.} while|(WaitMou|
|00002450| 73 65 55 70 28 29 29 3b | 0a 09 09 09 09 09 0a 09 |seUp());|........|
|00002460| 09 09 09 09 0a 09 09 09 | 09 09 0a 09 09 09 09 09 |........|........|
|00002470| 69 66 28 62 75 74 74 6f | 6e 44 6f 77 6e 20 3d 3d |if(butto|nDown ==|
|00002480| 20 74 72 75 65 29 0a 09 | 09 09 09 09 7b 0a 20 20 | true)..|....{. |
|00002490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 4e 65 | | Ne|
|000024c0| 77 47 61 6d 65 28 29 3b | 0a 20 20 20 20 20 20 20 |wGame();|. |
|000024d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024f0| 20 7d 0a 09 09 09 09 09 | 0a 09 09 09 09 7d 0a 09 | }......|.....}..|
|00002500| 09 09 09 0a 09 09 09 09 | 69 66 28 50 74 49 6e 52 |........|if(PtInR|
|00002510| 65 63 74 28 6c 6f 63 61 | 6c 50 6f 69 6e 74 2c 20 |ect(loca|lPoint, |
|00002520| 26 61 62 6f 75 74 52 65 | 63 74 29 20 29 0a 09 09 |&aboutRe|ct) )...|
|00002530| 09 09 7b 0a 09 09 09 09 | 09 42 6f 6f 6c 65 61 6e |..{.....|.Boolean|
|00002540| 20 62 75 74 74 6f 6e 44 | 6f 77 6e 20 3d 20 74 72 | buttonD|own = tr|
|00002550| 75 65 3b 0a 09 09 09 09 | 09 0a 09 09 09 09 09 52 |ue;.....|.......R|
|00002560| 47 42 46 6f 72 65 43 6f | 6c 6f 72 28 26 67 72 65 |GBForeCo|lor(&gre|
|00002570| 79 43 6f 6c 6f 72 29 3b | 0a 09 09 09 09 09 50 65 |yColor);|......Pe|
|00002580| 6e 4d 6f 64 65 28 73 75 | 62 50 69 6e 29 3b 0a 09 |nMode(su|bPin);..|
|00002590| 09 09 09 09 50 61 69 6e | 74 52 65 63 74 28 26 61 |....Pain|tRect(&a|
|000025a0| 62 6f 75 74 52 65 63 74 | 29 3b 0a 09 09 09 09 09 |boutRect|);......|
|000025b0| 46 6f 72 65 43 6f 6c 6f | 72 28 62 6c 61 63 6b 43 |ForeColo|r(blackC|
|000025c0| 6f 6c 6f 72 29 3b 0a 09 | 09 09 09 09 50 65 6e 4e |olor);..|....PenN|
|000025d0| 6f 72 6d 61 6c 28 29 3b | 0a 0a 09 09 09 09 09 64 |ormal();|.......d|
|000025e0| 6f 0a 09 09 09 09 09 7b | 0a 09 09 09 09 09 09 47 |o......{|.......G|
|000025f0| 65 74 4d 6f 75 73 65 28 | 26 6c 6f 63 61 6c 50 6f |etMouse(|&localPo|
|00002600| 69 6e 74 29 3b 0a 09 09 | 09 09 09 09 0a 09 09 09 |int);...|........|
|00002610| 09 09 09 69 66 28 50 74 | 49 6e 52 65 63 74 28 6c |...if(Pt|InRect(l|
|00002620| 6f 63 61 6c 50 6f 69 6e | 74 2c 20 26 61 62 6f 75 |ocalPoin|t, &abou|
|00002630| 74 52 65 63 74 29 20 26 | 26 20 62 75 74 74 6f 6e |tRect) &|& button|
|00002640| 44 6f 77 6e 20 3d 3d 20 | 66 61 6c 73 65 29 0a 09 |Down == |false)..|
|00002650| 09 09 09 09 09 7b 0a 09 | 09 09 09 09 09 09 52 47 |.....{..|......RG|
|00002660| 42 46 6f 72 65 43 6f 6c | 6f 72 28 26 67 72 65 79 |BForeCol|or(&grey|
|00002670| 43 6f 6c 6f 72 29 3b 0a | 09 09 09 09 09 09 09 50 |Color);.|.......P|
|00002680| 65 6e 4d 6f 64 65 28 73 | 75 62 50 69 6e 29 3b 0a |enMode(s|ubPin);.|
|00002690| 09 09 09 09 09 09 09 50 | 61 69 6e 74 52 65 63 74 |.......P|aintRect|
|000026a0| 28 26 61 62 6f 75 74 52 | 65 63 74 29 3b 0a 09 09 |(&aboutR|ect);...|
|000026b0| 09 09 09 09 09 46 6f 72 | 65 43 6f 6c 6f 72 28 62 |.....For|eColor(b|
|000026c0| 6c 61 63 6b 43 6f 6c 6f | 72 29 3b 0a 09 09 09 09 |lackColo|r);.....|
|000026d0| 09 09 09 50 65 6e 4e 6f | 72 6d 61 6c 28 29 3b 0a |...PenNo|rmal();.|
|000026e0| 09 09 09 09 09 09 09 62 | 75 74 74 6f 6e 44 6f 77 |.......b|uttonDow|
|000026f0| 6e 20 3d 20 74 72 75 65 | 3b 0a 09 09 09 09 09 09 |n = true|;.......|
|00002700| 7d 0a 09 09 09 09 09 09 | 0a 09 09 09 09 09 09 69 |}.......|.......i|
|00002710| 66 28 28 21 50 74 49 6e | 52 65 63 74 28 6c 6f 63 |f((!PtIn|Rect(loc|
|00002720| 61 6c 50 6f 69 6e 74 2c | 20 26 61 62 6f 75 74 52 |alPoint,| &aboutR|
|00002730| 65 63 74 29 29 20 26 26 | 20 62 75 74 74 6f 6e 44 |ect)) &&| buttonD|
|00002740| 6f 77 6e 20 3d 3d 20 74 | 72 75 65 29 0a 09 09 09 |own == t|rue)....|
|00002750| 09 09 09 7b 0a 09 09 09 | 09 09 09 09 43 6f 70 79 |...{....|....Copy|
|00002760| 42 69 74 73 28 28 42 69 | 74 4d 61 70 20 2a 29 2a |Bits((Bi|tMap *)*|
|00002770| 67 61 6d 65 53 63 72 65 | 65 6e 50 69 78 2c 20 47 |gameScre|enPix, G|
|00002780| 65 74 50 6f 72 74 42 69 | 74 4d 61 70 46 6f 72 43 |etPortBi|tMapForC|
|00002790| 6f 70 79 42 69 74 73 28 | 70 6f 72 74 29 2c 20 26 |opyBits(|port), &|
|000027a0| 61 62 6f 75 74 52 65 63 | 74 2f 2a 73 72 63 2a 2f |aboutRec|t/*src*/|
|000027b0| 2c 20 26 61 62 6f 75 74 | 52 65 63 74 2f 2a 64 65 |, &about|Rect/*de|
|000027c0| 73 74 2a 2f 2c 20 73 72 | 63 43 6f 70 79 2c 20 6e |st*/, sr|cCopy, n|
|000027d0| 69 6c 29 3b 0a 09 09 09 | 09 09 09 09 62 75 74 74 |il);....|....butt|
|000027e0| 6f 6e 44 6f 77 6e 20 3d | 20 66 61 6c 73 65 3b 0a |onDown =| false;.|
|000027f0| 09 09 09 09 09 09 7d 20 | 0a 09 09 09 09 09 09 0a |......} |........|
|00002800| 09 09 09 09 09 7d 20 77 | 68 69 6c 65 28 57 61 69 |.....} w|hile(Wai|
|00002810| 74 4d 6f 75 73 65 55 70 | 28 29 29 3b 0a 09 09 09 |tMouseUp|());....|
|00002820| 09 09 0a 09 09 09 09 09 | 69 66 28 62 75 74 74 6f |........|if(butto|
|00002830| 6e 44 6f 77 6e 20 3d 3d | 20 74 72 75 65 29 0a 09 |nDown ==| true)..|
|00002840| 09 09 09 09 7b 0a 09 09 | 09 09 09 09 43 6f 70 79 |....{...|....Copy|
|00002850| 42 69 74 73 28 28 42 69 | 74 4d 61 70 20 2a 29 2a |Bits((Bi|tMap *)*|
|00002860| 67 61 6d 65 53 63 72 65 | 65 6e 50 69 78 2c 20 47 |gameScre|enPix, G|
|00002870| 65 74 50 6f 72 74 42 69 | 74 4d 61 70 46 6f 72 43 |etPortBi|tMapForC|
|00002880| 6f 70 79 42 69 74 73 28 | 70 6f 72 74 29 2c 20 26 |opyBits(|port), &|
|00002890| 61 62 6f 75 74 52 65 63 | 74 2f 2a 73 72 63 2a 2f |aboutRec|t/*src*/|
|000028a0| 2c 20 26 61 62 6f 75 74 | 52 65 63 74 2f 2a 64 65 |, &about|Rect/*de|
|000028b0| 73 74 2a 2f 2c 20 73 72 | 63 43 6f 70 79 2c 20 6e |st*/, sr|cCopy, n|
|000028c0| 69 6c 29 3b 0a 09 09 09 | 09 09 09 44 6f 41 62 6f |il);....|...DoAbo|
|000028d0| 75 74 53 63 72 65 65 6e | 28 29 3b 0a 09 09 09 09 |utScreen|();.....|
|000028e0| 09 7d 0a 09 09 09 09 7d | 0a 09 09 09 09 0a 09 09 |.}.....}|........|
|000028f0| 09 09 69 66 28 50 74 49 | 6e 52 65 63 74 28 6c 6f |..if(PtI|nRect(lo|
|00002900| 63 61 6c 50 6f 69 6e 74 | 2c 20 26 71 75 69 74 52 |calPoint|, &quitR|
|00002910| 65 63 74 29 20 29 0a 09 | 09 09 09 7b 0a 09 09 09 |ect) )..|...{....|
|00002920| 09 09 42 6f 6f 6c 65 61 | 6e 20 62 75 74 74 6f 6e |..Boolea|n button|
|00002930| 44 6f 77 6e 20 3d 20 74 | 72 75 65 3b 0a 09 09 09 |Down = t|rue;....|
|00002940| 09 09 0a 09 09 09 09 09 | 52 47 42 46 6f 72 65 43 |........|RGBForeC|
|00002950| 6f 6c 6f 72 28 26 67 72 | 65 79 43 6f 6c 6f 72 29 |olor(&gr|eyColor)|
|00002960| 3b 0a 09 09 09 09 09 50 | 65 6e 4d 6f 64 65 28 73 |;......P|enMode(s|
|00002970| 75 62 50 69 6e 29 3b 0a | 09 09 09 09 09 50 61 69 |ubPin);.|.....Pai|
|00002980| 6e 74 52 65 63 74 28 26 | 71 75 69 74 52 65 63 74 |ntRect(&|quitRect|
|00002990| 29 3b 0a 09 09 09 09 09 | 46 6f 72 65 43 6f 6c 6f |);......|ForeColo|
|000029a0| 72 28 62 6c 61 63 6b 43 | 6f 6c 6f 72 29 3b 0a 09 |r(blackC|olor);..|
|000029b0| 09 09 09 09 50 65 6e 4e | 6f 72 6d 61 6c 28 29 3b |....PenN|ormal();|
|000029c0| 0a 09 09 09 09 09 0a 09 | 09 09 09 09 64 6f 0a 09 |........|....do..|
|000029d0| 09 09 09 09 7b 0a 09 09 | 09 09 09 09 47 65 74 4d |....{...|....GetM|
|000029e0| 6f 75 73 65 28 26 6c 6f | 63 61 6c 50 6f 69 6e 74 |ouse(&lo|calPoint|
|000029f0| 29 3b 0a 09 09 09 09 09 | 09 09 09 09 09 09 09 0a |);......|........|
|00002a00| 09 09 09 09 09 09 0a 09 | 09 09 09 09 09 69 66 28 |........|.....if(|
|00002a10| 50 74 49 6e 52 65 63 74 | 28 6c 6f 63 61 6c 50 6f |PtInRect|(localPo|
|00002a20| 69 6e 74 2c 20 26 71 75 | 69 74 52 65 63 74 29 20 |int, &qu|itRect) |
|00002a30| 26 26 20 62 75 74 74 6f | 6e 44 6f 77 6e 20 3d 3d |&& butto|nDown ==|
|00002a40| 20 66 61 6c 73 65 29 0a | 09 09 09 09 09 09 7b 0a | false).|......{.|
|00002a50| 09 09 09 09 09 09 09 52 | 47 42 46 6f 72 65 43 6f |.......R|GBForeCo|
|00002a60| 6c 6f 72 28 26 67 72 65 | 79 43 6f 6c 6f 72 29 3b |lor(&gre|yColor);|
|00002a70| 0a 09 09 09 09 09 09 09 | 50 65 6e 4d 6f 64 65 28 |........|PenMode(|
|00002a80| 73 75 62 50 69 6e 29 3b | 0a 09 09 09 09 09 09 09 |subPin);|........|
|00002a90| 50 61 69 6e 74 52 65 63 | 74 28 26 71 75 69 74 52 |PaintRec|t(&quitR|
|00002aa0| 65 63 74 29 3b 0a 09 09 | 09 09 09 09 09 46 6f 72 |ect);...|.....For|
|00002ab0| 65 43 6f 6c 6f 72 28 62 | 6c 61 63 6b 43 6f 6c 6f |eColor(b|lackColo|
|00002ac0| 72 29 3b 0a 09 09 09 09 | 09 09 09 50 65 6e 4e 6f |r);.....|...PenNo|
|00002ad0| 72 6d 61 6c 28 29 3b 0a | 09 09 09 09 09 09 09 0a |rmal();.|........|
|00002ae0| 09 09 09 09 09 09 09 62 | 75 74 74 6f 6e 44 6f 77 |.......b|uttonDow|
|00002af0| 6e 20 3d 20 74 72 75 65 | 3b 0a 09 09 09 09 09 09 |n = true|;.......|
|00002b00| 7d 0a 09 09 09 09 09 09 | 0a 09 09 09 09 09 09 69 |}.......|.......i|
|00002b10| 66 28 28 21 50 74 49 6e | 52 65 63 74 28 6c 6f 63 |f((!PtIn|Rect(loc|
|00002b20| 61 6c 50 6f 69 6e 74 2c | 20 26 71 75 69 74 52 65 |alPoint,| &quitRe|
|00002b30| 63 74 29 29 20 26 26 20 | 62 75 74 74 6f 6e 44 6f |ct)) && |buttonDo|
|00002b40| 77 6e 20 3d 3d 20 74 72 | 75 65 29 0a 09 09 09 09 |wn == tr|ue).....|
|00002b50| 09 09 7b 0a 09 09 09 09 | 09 09 09 43 6f 70 79 42 |..{.....|...CopyB|
|00002b60| 69 74 73 28 28 42 69 74 | 4d 61 70 20 2a 29 2a 67 |its((Bit|Map *)*g|
|00002b70| 61 6d 65 53 63 72 65 65 | 6e 50 69 78 2c 20 47 65 |ameScree|nPix, Ge|
|00002b80| 74 50 6f 72 74 42 69 74 | 4d 61 70 46 6f 72 43 6f |tPortBit|MapForCo|
|00002b90| 70 79 42 69 74 73 28 70 | 6f 72 74 29 2c 20 26 71 |pyBits(p|ort), &q|
|00002ba0| 75 69 74 52 65 63 74 2f | 2a 73 72 63 2a 2f 2c 20 |uitRect/|*src*/, |
|00002bb0| 26 71 75 69 74 52 65 63 | 74 2f 2a 64 65 73 74 2a |&quitRec|t/*dest*|
|00002bc0| 2f 2c 20 73 72 63 43 6f | 70 79 2c 20 6e 69 6c 29 |/, srcCo|py, nil)|
|00002bd0| 3b 0a 09 09 09 09 09 09 | 09 62 75 74 74 6f 6e 44 |;.......|.buttonD|
|00002be0| 6f 77 6e 20 3d 20 66 61 | 6c 73 65 3b 0a 09 09 09 |own = fa|lse;....|
|00002bf0| 09 09 09 7d 20 0a 09 09 | 09 09 09 09 0a 09 09 09 |...} ...|........|
|00002c00| 09 09 7d 20 77 68 69 6c | 65 28 57 61 69 74 4d 6f |..} whil|e(WaitMo|
|00002c10| 75 73 65 55 70 28 29 29 | 3b 0a 09 09 09 09 09 0a |useUp())|;.......|
|00002c20| 09 09 09 09 09 69 66 28 | 62 75 74 74 6f 6e 44 6f |.....if(|buttonDo|
|00002c30| 77 6e 20 3d 3d 20 74 72 | 75 65 29 0a 09 09 09 09 |wn == tr|ue).....|
|00002c40| 09 7b 0a 09 09 09 09 09 | 09 43 6f 70 79 42 69 74 |.{......|.CopyBit|
|00002c50| 73 28 28 42 69 74 4d 61 | 70 20 2a 29 2a 67 61 6d |s((BitMa|p *)*gam|
|00002c60| 65 53 63 72 65 65 6e 50 | 69 78 2c 20 47 65 74 50 |eScreenP|ix, GetP|
|00002c70| 6f 72 74 42 69 74 4d 61 | 70 46 6f 72 43 6f 70 79 |ortBitMa|pForCopy|
|00002c80| 42 69 74 73 28 70 6f 72 | 74 29 2c 20 26 71 75 69 |Bits(por|t), &qui|
|00002c90| 74 52 65 63 74 2f 2a 73 | 72 63 2a 2f 2c 20 26 71 |tRect/*s|rc*/, &q|
|00002ca0| 75 69 74 52 65 63 74 2f | 2a 64 65 73 74 2a 2f 2c |uitRect/|*dest*/,|
|00002cb0| 20 73 72 63 43 6f 70 79 | 2c 20 6e 69 6c 29 3b 0a | srcCopy|, nil);.|
|00002cc0| 09 09 09 09 09 09 53 68 | 75 74 44 6f 77 6e 28 29 |......Sh|utDown()|
|00002cd0| 3b 0a 09 09 09 09 09 7d | 0a 09 09 09 09 7d 0a 09 |;......}|.....}..|
|00002ce0| 09 09 09 62 72 65 61 6b | 3b 0a 09 09 09 09 63 61 |...break|;.....ca|
|00002cf0| 73 65 20 69 6e 44 72 61 | 67 3a 0a 20 20 20 20 20 |se inDra|g:. |
|00002d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d20| 20 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00002d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d40| 20 20 20 20 20 20 20 20 | 20 20 20 52 65 63 74 09 | | Rect.|
|00002d50| 6d 79 52 65 63 74 20 3d | 20 7b 30 2c 20 30 2c 20 |myRect =| {0, 0, |
|00002d60| 30 2c 20 30 20 7d 3b 0a | 20 20 20 20 20 20 20 20 |0, 0 };.| |
|00002d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 0a 09 | | ..|
|00002d90| 09 09 09 09 44 72 61 67 | 57 69 6e 64 6f 77 28 67 |....Drag|Window(g|
|00002da0| 61 6d 65 57 69 6e 64 6f | 77 2c 20 74 68 65 45 76 |ameWindo|w, theEv|
|00002db0| 65 6e 74 2d 3e 77 68 65 | 72 65 2c 20 26 6d 79 52 |ent->whe|re, &myR|
|00002dc0| 65 63 74 29 3b 2f 2f 71 | 64 2e 73 63 72 65 65 6e |ect);//q|d.screen|
|00002dd0| 42 69 74 73 2e 62 6f 75 | 6e 64 73 29 3b 0a 20 20 |Bits.bou|nds);. |
|00002de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e00| 20 20 20 20 20 20 7d 0a | 09 09 09 09 62 72 65 61 | }.|....brea|
|00002e10| 6b 3b 20 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |k; . | |
|00002e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 0a 09 09 09 | | ....|
|00002e30| 7d 09 0a 09 09 09 0a 09 | 09 09 2f 2f 48 61 6e 64 |}.......|..//Hand|
|00002e40| 6c 65 4d 6f 75 73 65 28 | 74 68 65 45 76 65 6e 74 |leMouse(|theEvent|
|00002e50| 29 3b 0a 09 09 09 62 72 | 65 61 6b 3b 0a 09 09 63 |);....br|eak;...c|
|00002e60| 61 73 65 20 6b 65 79 44 | 6f 77 6e 3a 0a 09 09 09 |ase keyD|own:....|
|00002e70| 74 68 65 4b 65 79 20 3d | 20 28 63 68 61 72 29 28 |theKey =| (char)(|
|00002e80| 74 68 65 45 76 65 6e 74 | 2d 3e 6d 65 73 73 61 67 |theEvent|->messag|
|00002e90| 65 20 26 20 63 68 61 72 | 43 6f 64 65 4d 61 73 6b |e & char|CodeMask|
|00002ea0| 29 3b 0a 09 09 09 73 77 | 69 74 63 68 28 74 68 65 |);....sw|itch(the|
|00002eb0| 4b 65 79 29 0a 09 09 09 | 7b 0a 09 09 09 09 63 61 |Key)....|{.....ca|
|00002ec0| 73 65 20 27 71 27 3a 0a | 09 09 09 09 63 61 73 65 |se 'q':.|....case|
|00002ed0| 20 27 51 27 3a 0a 20 20 | 20 20 20 20 20 20 20 20 | 'Q':. | |
|00002ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //|
|00002f00| 69 66 20 77 65 27 72 65 | 20 69 6e 20 61 20 67 61 |if we're| in a ga|
|00002f10| 6d 65 2c 20 77 65 20 67 | 6f 20 62 61 63 6b 20 74 |me, we g|o back t|
|00002f20| 6f 20 74 68 65 20 6d 61 | 69 6e 20 6d 65 6e 75 20 |o the ma|in menu |
|00002f30| 69 6e 73 74 65 61 64 20 | 6f 66 20 65 78 69 74 69 |instead |of exiti|
|00002f40| 6e 67 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ng. | |
|00002f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002f60| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 67 | | if (g|
|00002f70| 50 6c 61 79 69 6e 67 29 | 0a 20 20 20 20 20 20 20 |Playing)|. |
|00002f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002fa0| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00002fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 45 | | E|
|00002fd0| 6e 64 47 61 6d 65 28 29 | 3b 0a 20 20 20 20 20 20 |ndGame()|;. |
|00002fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003000| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|00003010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003020| 20 20 20 20 20 20 20 20 | 20 20 20 20 65 6c 73 65 | | else|
|00003030| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003050| 20 20 20 20 20 20 20 20 | 20 7b 09 09 09 09 09 0a | | {......|
|00003060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003080| 20 20 20 20 20 20 20 20 | 20 20 20 20 53 68 75 74 | | Shut|
|00003090| 44 6f 77 6e 28 29 3b 0a | 20 20 20 20 20 20 20 20 |Down();.| |
|000030a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000030b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000030c0| 7d 0a 09 09 09 09 09 62 | 72 65 61 6b 3b 0a 09 09 |}......b|reak;...|
|000030d0| 09 09 09 0a 09 09 09 09 | 63 61 73 65 20 27 6e 27 |........|case 'n'|
|000030e0| 3a 0a 09 09 09 09 63 61 | 73 65 20 27 4e 27 3a 0a |:.....ca|se 'N':.|
|000030f0| 09 09 09 09 09 52 47 42 | 46 6f 72 65 43 6f 6c 6f |.....RGB|ForeColo|
|00003100| 72 28 26 67 72 65 79 43 | 6f 6c 6f 72 29 3b 0a 09 |r(&greyC|olor);..|
|00003110| 09 09 09 09 50 65 6e 4d | 6f 64 65 28 73 75 62 50 |....PenM|ode(subP|
|00003120| 69 6e 29 3b 0a 09 09 09 | 09 09 50 61 69 6e 74 52 |in);....|..PaintR|
|00003130| 65 63 74 28 26 6e 65 77 | 47 61 6d 65 52 65 63 74 |ect(&new|GameRect|
|00003140| 29 3b 0a 09 09 09 09 09 | 46 6f 72 65 43 6f 6c 6f |);......|ForeColo|
|00003150| 72 28 62 6c 61 63 6b 43 | 6f 6c 6f 72 29 3b 0a 09 |r(blackC|olor);..|
|00003160| 09 09 09 09 44 65 6c 61 | 79 46 6f 72 28 31 35 29 |....Dela|yFor(15)|
|00003170| 3b 0a 09 09 09 09 09 43 | 6f 70 79 42 69 74 73 28 |;......C|opyBits(|
|00003180| 28 42 69 74 4d 61 70 20 | 2a 29 2a 67 61 6d 65 53 |(BitMap |*)*gameS|
|00003190| 63 72 65 65 6e 50 69 78 | 2c 20 47 65 74 50 6f 72 |creenPix|, GetPor|
|000031a0| 74 42 69 74 4d 61 70 46 | 6f 72 43 6f 70 79 42 69 |tBitMapF|orCopyBi|
|000031b0| 74 73 28 70 6f 72 74 29 | 2c 20 26 6e 65 77 47 61 |ts(port)|, &newGa|
|000031c0| 6d 65 52 65 63 74 2f 2a | 73 72 63 2a 2f 2c 20 26 |meRect/*|src*/, &|
|000031d0| 6e 65 77 47 61 6d 65 52 | 65 63 74 2f 2a 64 65 73 |newGameR|ect/*des|
|000031e0| 74 2a 2f 2c 20 73 72 63 | 43 6f 70 79 2c 20 6e 69 |t*/, src|Copy, ni|
|000031f0| 6c 29 3b 0a 0a 09 09 09 | 09 09 0a 09 09 09 09 09 |l);.....|........|
|00003200| 0a 09 09 09 09 09 42 6c | 69 74 57 68 6f 6c 65 57 |......Bl|itWholeW|
|00003210| 6f 72 6b 4d 61 70 54 6f | 53 63 72 65 65 6e 28 29 |orkMapTo|Screen()|
|00003220| 3b 0a 09 09 09 09 09 0a | 20 20 20 20 20 20 20 20 |;.......| |
|00003230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003250| 4e 65 77 47 61 6d 65 28 | 29 3b 0a 09 09 09 09 09 |NewGame(|);......|
|00003260| 0a 09 09 09 09 09 62 72 | 65 61 6b 3b 0a 09 09 09 |......br|eak;....|
|00003270| 09 09 0a 09 09 09 09 63 | 61 73 65 20 27 6f 27 3a |.......c|ase 'o':|
|00003280| 0a 09 09 09 09 63 61 73 | 65 20 27 4f 27 3a 0a 09 |.....cas|e 'O':..|
|00003290| 09 09 09 09 52 47 42 46 | 6f 72 65 43 6f 6c 6f 72 |....RGBF|oreColor|
|000032a0| 28 26 67 72 65 79 43 6f | 6c 6f 72 29 3b 0a 09 09 |(&greyCo|lor);...|
|000032b0| 09 09 09 50 65 6e 4d 6f | 64 65 28 73 75 62 50 69 |...PenMo|de(subPi|
|000032c0| 6e 29 3b 0a 09 09 09 09 | 09 50 61 69 6e 74 52 65 |n);.....|.PaintRe|
|000032d0| 63 74 28 26 61 62 6f 75 | 74 52 65 63 74 29 3b 0a |ct(&abou|tRect);.|
|000032e0| 09 09 09 09 09 46 6f 72 | 65 43 6f 6c 6f 72 28 62 |.....For|eColor(b|
|000032f0| 6c 61 63 6b 43 6f 6c 6f | 72 29 3b 0a 09 09 09 09 |lackColo|r);.....|
|00003300| 09 44 65 6c 61 79 46 6f | 72 28 31 35 29 3b 0a 09 |.DelayFo|r(15);..|
|00003310| 09 09 09 09 43 6f 70 79 | 42 69 74 73 28 28 42 69 |....Copy|Bits((Bi|
|00003320| 74 4d 61 70 20 2a 29 2a | 67 61 6d 65 53 63 72 65 |tMap *)*|gameScre|
|00003330| 65 6e 50 69 78 2c 20 47 | 65 74 50 6f 72 74 42 69 |enPix, G|etPortBi|
|00003340| 74 4d 61 70 46 6f 72 43 | 6f 70 79 42 69 74 73 28 |tMapForC|opyBits(|
|00003350| 70 6f 72 74 29 2c 20 26 | 61 62 6f 75 74 52 65 63 |port), &|aboutRec|
|00003360| 74 2f 2a 73 72 63 2a 2f | 2c 20 26 61 62 6f 75 74 |t/*src*/|, &about|
|00003370| 52 65 63 74 2f 2a 64 65 | 73 74 2a 2f 2c 20 73 72 |Rect/*de|st*/, sr|
|00003380| 63 43 6f 70 79 2c 20 6e | 69 6c 29 3b 0a 0a 09 09 |cCopy, n|il);....|
|00003390| 09 09 09 2f 2f 44 6f 4f | 70 74 69 6f 6e 73 44 69 |...//DoO|ptionsDi|
|000033a0| 61 6c 6f 67 28 29 3b 0a | 09 09 09 09 09 62 72 65 |alog();.|.....bre|
|000033b0| 61 6b 3b 0a 09 09 09 09 | 09 0a 09 09 09 09 64 65 |ak;.....|......de|
|000033c0| 66 61 75 6c 74 3a 0a 09 | 09 09 09 09 53 79 73 42 |fault:..|....SysB|
|000033d0| 65 65 70 28 33 30 29 3b | 0a 09 09 09 09 09 62 72 |eep(30);|......br|
|000033e0| 65 61 6b 3b 0a 09 09 09 | 7d 0a 09 09 09 62 72 65 |eak;....|}....bre|
|000033f0| 61 6b 3b 0a 09 09 09 0a | 09 09 63 61 73 65 20 75 |ak;.....|..case u|
|00003400| 70 64 61 74 65 45 76 74 | 3a 0a 09 09 09 42 65 67 |pdateEvt|:....Beg|
|00003410| 69 6e 55 70 64 61 74 65 | 28 67 61 6d 65 57 69 6e |inUpdate|(gameWin|
|00003420| 64 6f 77 29 3b 0a 09 09 | 09 44 72 61 77 53 63 72 |dow);...|.DrawScr|
|00003430| 65 65 6e 28 29 3b 0a 09 | 09 09 45 6e 64 55 70 64 |een();..|..EndUpd|
|00003440| 61 74 65 28 67 61 6d 65 | 57 69 6e 64 6f 77 29 3b |ate(game|Window);|
|00003450| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 63 61 73 |....brea|k;...cas|
|00003460| 65 20 61 63 74 69 76 61 | 74 65 45 76 74 3a 0a 09 |e activa|teEvt:..|
|00003470| 09 09 62 72 65 61 6b 3b | 0a 09 09 63 61 73 65 20 |..break;|...case |
|00003480| 64 69 73 6b 45 76 74 3a | 0a 09 09 09 62 72 65 61 |diskEvt:|....brea|
|00003490| 6b 3b 0a 09 09 09 0a 09 | 09 63 61 73 65 20 6f 73 |k;......|.case os|
|000034a0| 45 76 74 3a 0a 09 09 09 | 62 72 65 61 6b 3b 0a 09 |Evt:....|break;..|
|000034b0| 09 63 61 73 65 20 6b 48 | 69 67 68 4c 65 76 65 6c |.case kH|ighLevel|
|000034c0| 45 76 65 6e 74 3a 0a 20 | 20 20 20 20 20 20 20 20 |Event:. | |
|000034d0| 20 20 20 20 20 20 20 20 | 20 20 20 48 61 6e 64 6c | | Handl|
|000034e0| 65 48 4c 45 76 65 6e 74 | 28 74 68 65 45 76 65 6e |eHLEvent|(theEven|
|000034f0| 74 29 3b 0a 09 09 63 61 | 73 65 20 6e 75 6c 6c 45 |t);...ca|se nullE|
|00003500| 76 65 6e 74 3a 0a 09 09 | 62 72 65 61 6b 3b 0a 09 |vent:...|break;..|
|00003510| 7d 0a 7d 0a 0a 0a 76 6f | 69 64 20 48 61 6e 64 6c |}.}...vo|id Handl|
|00003520| 65 48 4c 45 76 65 6e 74 | 20 28 45 76 65 6e 74 52 |eHLEvent| (EventR|
|00003530| 65 63 6f 72 64 20 2a 74 | 68 65 45 76 65 6e 74 29 |ecord *t|heEvent)|
|00003540| 0a 7b 0a 09 4f 53 45 72 | 72 09 65 72 72 3b 0a 09 |.{..OSEr|r.err;..|
|00003550| 65 72 72 20 3d 20 41 45 | 50 72 6f 63 65 73 73 41 |err = AE|ProcessA|
|00003560| 70 70 6c 65 45 76 65 6e | 74 28 74 68 65 45 76 65 |ppleEven|t(theEve|
|00003570| 6e 74 29 3b 0a 7d 0a 0a | 0a 0a 0a 76 6f 69 64 20 |nt);.}..|...void |
|00003580| 48 61 6e 64 6c 65 4d 65 | 6e 75 43 68 6f 69 63 65 |HandleMe|nuChoice|
|00003590| 28 6c 6f 6e 67 20 6d 65 | 6e 75 43 68 6f 69 63 65 |(long me|nuChoice|
|000035a0| 29 20 20 0a 7b 0a 09 73 | 68 6f 72 74 09 09 09 6d |) .{..s|hort...m|
|000035b0| 65 6e 75 49 44 20 20 20 | 20 20 3d 20 48 69 57 6f |enuID | = HiWo|
|000035c0| 72 64 28 6d 65 6e 75 43 | 68 6f 69 63 65 29 3b 0a |rd(menuC|hoice);.|
|000035d0| 09 73 68 6f 72 74 09 09 | 09 6d 65 6e 75 49 74 65 |.short..|.menuIte|
|000035e0| 6d 20 20 20 3d 20 4c 6f | 57 6f 72 64 28 6d 65 6e |m = Lo|Word(men|
|000035f0| 75 43 68 6f 69 63 65 29 | 3b 0a 09 0a 09 52 65 63 |uChoice)|;....Rec|
|00003600| 74 20 6e 65 77 47 61 6d | 65 52 65 63 74 20 3d 20 |t newGam|eRect = |
|00003610| 7b 34 30 31 2c 20 37 32 | 2c 20 34 32 36 2c 20 31 |{401, 72|, 426, 1|
|00003620| 39 35 7d 3b 0a 09 52 65 | 63 74 20 61 62 6f 75 74 |95};..Re|ct about|
|00003630| 52 65 63 74 20 3d 20 7b | 34 30 33 2c 20 32 34 37 |Rect = {|403, 247|
|00003640| 2c 20 34 31 38 2c 20 33 | 34 36 7d 3b 0a 09 52 65 |, 418, 3|46};..Re|
|00003650| 63 74 20 71 75 69 74 52 | 65 63 74 20 3d 20 7b 34 |ct quitR|ect = {4|
|00003660| 30 32 2c 20 33 38 35 2c | 20 34 32 30 2c 20 34 34 |02, 385,| 420, 44|
|00003670| 35 7d 3b 0a 0a 09 52 47 | 42 43 6f 6c 6f 72 20 67 |5};...RG|BColor g|
|00003680| 72 65 79 43 6f 6c 6f 72 | 20 3d 20 7b 31 36 30 30 |reyColor| = {1600|
|00003690| 30 2c 20 31 36 30 30 30 | 2c 20 31 36 30 30 30 7d |0, 16000|, 16000}|
|000036a0| 3b 0a 09 0a 09 43 47 72 | 61 66 50 74 72 20 20 20 |;....CGr|afPtr |
|000036b0| 20 70 6f 72 74 3b 0a 09 | 0a 09 70 6f 72 74 20 3d | port;..|..port =|
|000036c0| 20 47 65 74 57 69 6e 64 | 6f 77 50 6f 72 74 28 67 | GetWind|owPort(g|
|000036d0| 61 6d 65 57 69 6e 64 6f | 77 29 3b 0a 09 0a 09 73 |ameWindo|w);....s|
|000036e0| 77 69 74 63 68 20 28 6d | 65 6e 75 49 44 29 0a 09 |witch (m|enuID)..|
|000036f0| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00003700| 20 20 2f 2f 61 70 70 6c | 69 63 61 74 69 6f 6e 20 | //appl|ication |
|00003710| 6d 65 6e 75 0a 09 09 63 | 61 73 65 20 31 30 30 30 |menu...c|ase 1000|
|00003720| 3a 0a 09 09 09 7b 0a 20 | 20 20 20 20 20 20 20 20 |:....{. | |
|00003730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003740| 20 20 20 73 77 69 74 63 | 68 28 6d 65 6e 75 49 74 | switc|h(menuIt|
|00003750| 65 6d 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |em). | |
|00003760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003770| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00003780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003790| 20 20 20 20 20 20 2f 2f | 41 62 6f 75 74 20 42 72 | //|About Br|
|000037a0| 69 63 6b 6f 69 64 73 2e | 2e 2e 0a 20 20 20 20 20 |ickoids.|... |
|000037b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|000037d0| 61 73 65 20 31 3a 0a 20 | 20 20 20 20 20 20 20 20 |ase 1:. | |
|000037e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003800| 20 20 20 44 6f 41 62 6f | 75 74 53 63 72 65 65 6e | DoAbo|utScreen|
|00003810| 28 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |();. | |
|00003820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003840| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 20 20 20 |break;. | |
|00003850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003860| 20 20 20 20 20 20 20 20 | 20 20 20 64 65 66 61 75 | | defau|
|00003870| 6c 74 3a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |lt:. | |
|00003880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000038a0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 20 20 20 |break;. | |
|000038b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000038c0| 20 20 20 7d 0a 09 09 09 | 7d 0a 09 09 09 62 72 65 | }....|}....bre|
|000038d0| 61 6b 3b 0a 0a 09 09 63 | 61 73 65 20 31 30 30 31 |ak;....c|ase 1001|
|000038e0| 3a 0a 09 09 09 73 77 69 | 74 63 68 28 6d 65 6e 75 |:....swi|tch(menu|
|000038f0| 49 74 65 6d 29 0a 09 09 | 09 7b 0a 09 09 09 09 63 |Item)...|.{.....c|
|00003900| 61 73 65 20 31 3a 0a 09 | 09 09 09 09 69 66 28 67 |ase 1:..|....if(g|
|00003910| 50 61 75 73 65 64 29 0a | 09 09 09 09 09 7b 0a 09 |Paused).|.....{..|
|00003920| 09 09 09 09 09 67 50 61 | 75 73 65 64 20 3d 20 66 |.....gPa|used = f|
|00003930| 61 6c 73 65 3b 09 0a 09 | 09 09 09 09 7d 0a 09 09 |alse;...|....}...|
|00003940| 09 09 09 65 6c 73 65 0a | 09 09 09 09 09 7b 0a 09 |...else.|.....{..|
|00003950| 09 09 09 09 09 52 47 42 | 46 6f 72 65 43 6f 6c 6f |.....RGB|ForeColo|
|00003960| 72 28 26 67 72 65 79 43 | 6f 6c 6f 72 29 3b 0a 09 |r(&greyC|olor);..|
|00003970| 09 09 09 09 09 50 65 6e | 4d 6f 64 65 28 73 75 62 |.....Pen|Mode(sub|
|00003980| 50 69 6e 29 3b 0a 09 09 | 09 09 09 09 50 61 69 6e |Pin);...|....Pain|
|00003990| 74 52 65 63 74 28 26 6e | 65 77 47 61 6d 65 52 65 |tRect(&n|ewGameRe|
|000039a0| 63 74 29 3b 0a 09 09 09 | 09 09 09 46 6f 72 65 43 |ct);....|...ForeC|
|000039b0| 6f 6c 6f 72 28 62 6c 61 | 63 6b 43 6f 6c 6f 72 29 |olor(bla|ckColor)|
|000039c0| 3b 0a 09 09 09 09 09 09 | 09 0a 09 09 09 09 09 09 |;.......|........|
|000039d0| 44 65 6c 61 79 46 6f 72 | 28 31 35 29 3b 0a 09 09 |DelayFor|(15);...|
|000039e0| 09 09 09 09 43 6f 70 79 | 42 69 74 73 28 28 42 69 |....Copy|Bits((Bi|
|000039f0| 74 4d 61 70 20 2a 29 2a | 67 61 6d 65 53 63 72 65 |tMap *)*|gameScre|
|00003a00| 65 6e 50 69 78 2c 20 47 | 65 74 50 6f 72 74 42 69 |enPix, G|etPortBi|
|00003a10| 74 4d 61 70 46 6f 72 43 | 6f 70 79 42 69 74 73 28 |tMapForC|opyBits(|
|00003a20| 70 6f 72 74 29 2c 20 26 | 6e 65 77 47 61 6d 65 52 |port), &|newGameR|
|00003a30| 65 63 74 2f 2a 73 72 63 | 2a 2f 2c 20 26 6e 65 77 |ect/*src|*/, &new|
|00003a40| 47 61 6d 65 52 65 63 74 | 2f 2a 64 65 73 74 2a 2f |GameRect|/*dest*/|
|00003a50| 2c 20 73 72 63 43 6f 70 | 79 2c 20 6e 69 6c 29 3b |, srcCop|y, nil);|
|00003a60| 0a 09 09 09 09 09 09 0a | 09 09 09 09 09 09 2f 2f |........|......//|
|00003a70| 48 69 64 65 43 75 72 73 | 6f 72 28 29 3b 0a 09 09 |HideCurs|or();...|
|00003a80| 09 09 09 7d 0a 09 09 09 | 09 09 0a 09 09 09 09 09 |...}....|........|
|00003a90| 4e 65 77 47 61 6d 65 28 | 29 3b 0a 20 20 20 20 20 |NewGame(|);. |
|00003aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ac0| 20 20 20 62 72 65 61 6b | 3b 0a 09 09 09 09 09 0a | break|;.......|
|00003ad0| 09 09 09 09 63 61 73 65 | 20 32 3a 0a 09 09 09 09 |....case| 2:.....|
|00003ae0| 09 69 66 28 67 50 61 75 | 73 65 64 20 3d 3d 20 66 |.if(gPau|sed == f|
|00003af0| 61 6c 73 65 29 0a 09 09 | 09 09 09 7b 0a 09 09 09 |alse)...|...{....|
|00003b00| 09 09 09 52 47 42 46 6f | 72 65 43 6f 6c 6f 72 28 |...RGBFo|reColor(|
|00003b10| 26 67 72 65 79 43 6f 6c | 6f 72 29 3b 0a 09 09 09 |&greyCol|or);....|
|00003b20| 09 09 09 50 65 6e 4d 6f | 64 65 28 73 75 62 50 69 |...PenMo|de(subPi|
|00003b30| 6e 29 3b 0a 09 09 09 09 | 09 09 50 61 69 6e 74 52 |n);.....|..PaintR|
|00003b40| 65 63 74 28 26 61 62 6f | 75 74 52 65 63 74 29 3b |ect(&abo|utRect);|
|00003b50| 0a 09 09 09 09 09 09 46 | 6f 72 65 43 6f 6c 6f 72 |.......F|oreColor|
|00003b60| 28 62 6c 61 63 6b 43 6f | 6c 6f 72 29 3b 0a 09 09 |(blackCo|lor);...|
|00003b70| 09 09 09 09 44 65 6c 61 | 79 46 6f 72 28 31 35 29 |....Dela|yFor(15)|
|00003b80| 3b 0a 09 09 09 09 09 09 | 43 6f 70 79 42 69 74 73 |;.......|CopyBits|
|00003b90| 28 28 42 69 74 4d 61 70 | 20 2a 29 2a 67 61 6d 65 |((BitMap| *)*game|
|00003ba0| 53 63 72 65 65 6e 50 69 | 78 2c 20 47 65 74 50 6f |ScreenPi|x, GetPo|
|00003bb0| 72 74 42 69 74 4d 61 70 | 46 6f 72 43 6f 70 79 42 |rtBitMap|ForCopyB|
|00003bc0| 69 74 73 28 70 6f 72 74 | 29 2c 20 26 61 62 6f 75 |its(port|), &abou|
|00003bd0| 74 52 65 63 74 2f 2a 73 | 72 63 2a 2f 2c 20 26 61 |tRect/*s|rc*/, &a|
|00003be0| 62 6f 75 74 52 65 63 74 | 2f 2a 64 65 73 74 2a 2f |boutRect|/*dest*/|
|00003bf0| 2c 20 73 72 63 43 6f 70 | 79 2c 20 6e 69 6c 29 3b |, srcCop|y, nil);|
|00003c00| 0a 09 09 09 09 09 7d 0a | 20 20 20 20 20 20 20 20 |......}.| |
|00003c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c30| 69 66 20 28 67 50 6c 61 | 79 69 6e 67 20 3d 3d 20 |if (gPla|ying == |
|00003c40| 74 72 75 65 29 0a 20 20 | 20 20 20 20 20 20 20 20 |true). | |
|00003c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 0a | | {.|
|00003c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 45 6e 64 47 | | EndG|
|00003ca0| 61 6d 65 28 29 3b 0a 20 | 20 20 20 20 20 20 20 20 |ame();. | |
|00003cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | | }|
|00003cd0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003cf0| 20 20 20 20 20 20 20 20 | 20 0a 09 09 09 09 09 2f | | ....../|
|00003d00| 2f 44 6f 4f 70 74 69 6f | 6e 73 44 69 61 6c 6f 67 |/DoOptio|nsDialog|
|00003d10| 28 29 3b 0a 09 09 09 09 | 09 62 72 65 61 6b 3b 0a |();.....|.break;.|
|00003d20| 09 09 09 09 09 0a 09 09 | 09 09 63 61 73 65 20 34 |........|..case 4|
|00003d30| 3a 0a 09 09 09 09 09 69 | 66 28 67 50 61 75 73 65 |:......i|f(gPause|
|00003d40| 64 20 3d 3d 20 66 61 6c | 73 65 29 0a 09 09 09 09 |d == fal|se).....|
|00003d50| 09 7b 0a 09 09 09 09 09 | 09 52 47 42 46 6f 72 65 |.{......|.RGBFore|
|00003d60| 43 6f 6c 6f 72 28 26 67 | 72 65 79 43 6f 6c 6f 72 |Color(&g|reyColor|
|00003d70| 29 3b 0a 09 09 09 09 09 | 09 50 65 6e 4d 6f 64 65 |);......|.PenMode|
|00003d80| 28 73 75 62 50 69 6e 29 | 3b 0a 09 09 09 09 09 09 |(subPin)|;.......|
|00003d90| 50 61 69 6e 74 52 65 63 | 74 28 26 71 75 69 74 52 |PaintRec|t(&quitR|
|00003da0| 65 63 74 29 3b 0a 09 09 | 09 09 09 09 46 6f 72 65 |ect);...|....Fore|
|00003db0| 43 6f 6c 6f 72 28 62 6c | 61 63 6b 43 6f 6c 6f 72 |Color(bl|ackColor|
|00003dc0| 29 3b 0a 09 09 09 09 09 | 09 44 65 6c 61 79 46 6f |);......|.DelayFo|
|00003dd0| 72 28 31 35 29 3b 0a 09 | 09 09 09 09 09 43 6f 70 |r(15);..|.....Cop|
|00003de0| 79 42 69 74 73 28 28 42 | 69 74 4d 61 70 20 2a 29 |yBits((B|itMap *)|
|00003df0| 2a 67 61 6d 65 53 63 72 | 65 65 6e 50 69 78 2c 20 |*gameScr|eenPix, |
|00003e00| 47 65 74 50 6f 72 74 42 | 69 74 4d 61 70 46 6f 72 |GetPortB|itMapFor|
|00003e10| 43 6f 70 79 42 69 74 73 | 28 70 6f 72 74 29 2c 20 |CopyBits|(port), |
|00003e20| 26 71 75 69 74 52 65 63 | 74 2f 2a 73 72 63 2a 2f |&quitRec|t/*src*/|
|00003e30| 2c 20 26 71 75 69 74 52 | 65 63 74 2f 2a 64 65 73 |, &quitR|ect/*des|
|00003e40| 74 2a 2f 2c 20 73 72 63 | 43 6f 70 79 2c 20 6e 69 |t*/, src|Copy, ni|
|00003e50| 6c 29 3b 0a 09 09 09 09 | 09 7d 0a 09 09 09 09 09 |l);.....|.}......|
|00003e60| 53 68 75 74 44 6f 77 6e | 28 29 3b 0a 09 09 09 09 |ShutDown|();.....|
|00003e70| 09 62 72 65 61 6b 3b 0a | 09 09 09 7d 0a 09 09 09 |.break;.|...}....|
|00003e80| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 20 20 20 20 20 |....brea|k;. |
|00003e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ea0| 20 20 20 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00003eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 61 73 65 | | case|
|00003ec0| 20 31 30 30 32 3a 0a 20 | 20 20 20 20 20 20 20 20 | 1002:. | |
|00003ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ee0| 20 20 20 73 77 69 74 63 | 68 28 6d 65 6e 75 49 74 | switc|h(menuIt|
|00003ef0| 65 6d 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |em). | |
|00003f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f10| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00003f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f30| 20 20 2f 2f 73 6f 75 6e | 64 20 65 66 66 65 63 74 | //soun|d effect|
|00003f40| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|00003f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f60| 20 20 63 61 73 65 20 31 | 3a 0a 20 20 20 20 20 20 | case 1|:. |
|00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 | | if|
|00003f90| 20 28 67 53 6f 75 6e 64 | 4f 6e 29 0a 20 20 20 20 | (gSound|On). |
|00003fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fc0| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00003fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fe0| 20 20 20 20 20 20 20 20 | 20 20 43 68 65 63 6b 4d | | CheckM|
|00003ff0| 65 6e 75 49 74 65 6d 28 | 6f 70 74 69 6f 6e 73 4d |enuItem(|optionsM|
|00004000| 65 6e 75 2c 20 31 2c 20 | 30 29 3b 0a 20 20 20 20 |enu, 1, |0);. |
|00004010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004030| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|00004040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004050| 20 20 20 20 20 20 65 6c | 73 65 0a 20 20 20 20 20 | el|se. |
|00004060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00004080| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040a0| 20 20 20 20 20 20 20 20 | 20 43 68 65 63 6b 4d 65 | | CheckMe|
|000040b0| 6e 75 49 74 65 6d 28 6f | 70 74 69 6f 6e 73 4d 65 |nuItem(o|ptionsMe|
|000040c0| 6e 75 2c 20 31 2c 20 31 | 29 3b 0a 20 20 20 20 20 |nu, 1, 1|);. |
|000040d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | | }|
|000040f0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004110| 20 20 20 20 20 2f 2f 73 | 65 74 20 73 6f 75 6e 64 | //s|et sound|
|00004120| 20 6f 6e 20 6f 72 20 6f | 66 66 2c 20 77 68 61 74 | on or o|ff, what|
|00004130| 65 76 65 72 20 69 73 20 | 61 70 70 72 6f 70 72 69 |ever is |appropri|
|00004140| 61 74 65 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ate. | |
|00004150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004160| 20 20 20 20 20 20 20 20 | 67 53 6f 75 6e 64 4f 6e | |gSoundOn|
|00004170| 20 3d 20 21 67 53 6f 75 | 6e 64 4f 6e 3b 0a 20 20 | = !gSou|ndOn;. |
|00004180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004190| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041a0| 20 20 62 72 65 61 6b 3b | 0a 20 20 20 20 20 20 20 | break;|. |
|000041b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041c0| 20 20 20 20 20 20 20 20 | 20 0a 20 20 20 20 20 20 | | . |
|000041d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041e0| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 6d 75 73 69 | | //musi|
|000041f0| 63 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |c. | |
|00004200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004210| 20 20 63 61 73 65 20 32 | 3a 0a 20 20 20 20 20 20 | case 2|:. |
|00004220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 | | if|
|00004240| 20 28 67 4d 75 73 69 63 | 4f 6e 29 0a 20 20 20 20 | (gMusic|On). |
|00004250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004260| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004270| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00004280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004290| 20 20 20 20 20 20 20 20 | 20 20 43 68 65 63 6b 4d | | CheckM|
|000042a0| 65 6e 75 49 74 65 6d 28 | 6f 70 74 69 6f 6e 73 4d |enuItem(|optionsM|
|000042b0| 65 6e 75 2c 20 32 2c 20 | 30 29 3b 0a 20 20 20 20 |enu, 2, |0);. |
|000042c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000042d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000042e0| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|000042f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004300| 20 20 20 20 20 20 65 6c | 73 65 0a 20 20 20 20 20 | el|se. |
|00004310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00004330| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004350| 20 20 20 20 20 20 20 20 | 20 43 68 65 63 6b 4d 65 | | CheckMe|
|00004360| 6e 75 49 74 65 6d 28 6f | 70 74 69 6f 6e 73 4d 65 |nuItem(o|ptionsMe|
|00004370| 6e 75 2c 20 32 2c 20 31 | 29 3b 0a 20 20 20 20 20 |nu, 2, 1|);. |
|00004380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | | }|
|000043a0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000043b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000043c0| 20 20 20 20 20 2f 2f 73 | 65 74 20 73 6f 75 6e 64 | //s|et sound|
|000043d0| 20 6f 6e 20 6f 72 20 6f | 66 66 2c 20 77 68 61 74 | on or o|ff, what|
|000043e0| 65 76 65 72 20 69 73 20 | 61 70 70 72 6f 70 72 69 |ever is |appropri|
|000043f0| 61 74 65 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ate. | |
|00004400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004410| 20 20 20 20 20 20 20 20 | 67 4d 75 73 69 63 4f 6e | |gMusicOn|
|00004420| 20 3d 20 21 67 4d 75 73 | 69 63 4f 6e 3b 0a 20 20 | = !gMus|icOn;. |
|00004430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004450| 20 20 62 72 65 61 6b 3b | 0a 20 20 20 20 20 20 20 | break;|. |
|00004460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004470| 20 20 20 20 20 0a 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00004480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004490| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|000044a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 0a 20 20 20 | | . |
|000044b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000044c0| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0a | | break;.|
|000044d0| 09 7d 0a 7d 0a 0a 0a 0a | 0a 0a 2f 2f 54 68 69 73 |.}.}....|..//This|
|000044e0| 20 66 75 6e 63 74 69 6f | 6e 20 68 61 6e 64 6c 65 | functio|n handle|
|000044f0| 73 20 6b 65 79 62 6f 61 | 72 64 20 69 6e 70 75 74 |s keyboa|rd input|
|00004500| 20 64 75 72 69 6e 67 20 | 67 61 6d 65 70 6c 61 79 | during |gameplay|
|00004510| 0a 76 6f 69 64 20 43 68 | 65 63 6b 46 6f 72 4b 65 |.void Ch|eckForKe|
|00004520| 79 73 28 76 6f 69 64 29 | 0a 7b 0a 09 4b 65 79 4d |ys(void)|.{..KeyM|
|00004530| 61 70 09 6d 79 4b 65 79 | 4d 61 70 3b 0a 09 0a 09 |ap.myKey|Map;....|
|00004540| 0a 09 47 65 74 4b 65 79 | 73 28 6d 79 4b 65 79 4d |..GetKey|s(myKeyM|
|00004550| 61 70 29 3b 0a 09 0a 09 | 69 66 28 43 68 65 63 6b |ap);....|if(Check|
|00004560| 4b 65 79 4d 61 70 46 6f | 72 4b 65 79 28 6d 79 4b |KeyMapFo|rKey(myK|
|00004570| 65 79 4d 61 70 2c 20 31 | 32 2f 2a 51 2a 2f 29 29 |eyMap, 1|2/*Q*/))|
|00004580| 2f 2f 63 68 65 63 6b 20 | 66 6f 72 20 71 75 69 74 |//check |for quit|
|00004590| 0a 09 7b 0a 09 09 0a 09 | 09 0a 09 09 45 72 61 73 |..{.....|....Eras|
|000045a0| 65 57 6f 72 6b 4d 61 70 | 52 65 63 74 28 26 73 63 |eWorkMap|Rect(&sc|
|000045b0| 6f 72 65 52 65 63 74 29 | 3b 0a 09 09 45 72 61 73 |oreRect)|;...Eras|
|000045c0| 65 57 6f 72 6b 4d 61 70 | 52 65 63 74 28 26 6c 65 |eWorkMap|Rect(&le|
|000045d0| 76 65 6c 52 65 63 74 29 | 3b 0a 20 20 20 20 20 20 |velRect)|;. |
|000045e0| 20 20 20 20 20 20 20 20 | 20 20 45 72 61 73 65 57 | | EraseW|
|000045f0| 6f 72 6b 4d 61 70 52 65 | 63 74 28 26 61 63 74 69 |orkMapRe|ct(&acti|
|00004600| 6f 6e 52 65 63 74 29 3b | 09 0a 20 20 20 20 20 20 |onRect);|.. |
|00004610| 20 20 20 20 20 20 20 20 | 20 20 0a 20 20 20 20 20 | | . |
|00004620| 20 20 20 20 20 20 20 20 | 20 20 20 45 6e 64 47 61 | | EndGa|
|00004630| 6d 65 28 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |me();. | |
|00004640| 20 20 20 20 20 20 0a 20 | 20 20 20 20 20 20 20 20 | . | |
|00004650| 20 20 20 20 20 20 20 44 | 72 61 77 53 63 72 65 65 | D|rawScree|
|00004660| 6e 28 29 3b 0a 09 7d 0a | 09 0a 09 69 66 28 43 68 |n();..}.|...if(Ch|
|00004670| 65 63 6b 4b 65 79 4d 61 | 70 46 6f 72 4b 65 79 28 |eckKeyMa|pForKey(|
|00004680| 6d 79 4b 65 79 4d 61 70 | 2c 20 33 35 2f 2a 50 2a |myKeyMap|, 35/*P*|
|00004690| 2f 29 29 2f 2f 63 68 65 | 63 6b 20 66 6f 72 20 50 |/))//che|ck for P|
|000046a0| 61 75 73 65 0a 09 7b 0a | 09 09 44 6f 50 61 75 73 |ause..{.|..DoPaus|
|000046b0| 65 28 29 3b 0a 09 7d 0a | 09 0a 09 69 66 28 43 68 |e();..}.|...if(Ch|
|000046c0| 65 63 6b 4b 65 79 4d 61 | 70 46 6f 72 4b 65 79 28 |eckKeyMa|pForKey(|
|000046d0| 6d 79 4b 65 79 4d 61 70 | 2c 20 34 39 2f 2a 73 70 |myKeyMap|, 49/*sp|
|000046e0| 61 63 65 62 61 72 2a 2f | 29 29 2f 2f 63 68 65 63 |acebar*/|))//chec|
|000046f0| 6b 20 66 6f 72 20 6c 61 | 75 63 68 69 6e 67 20 6f |k for la|uching o|
|00004700| 66 20 74 68 65 20 62 61 | 6c 6c 0a 09 7b 0a 20 20 |f the ba|ll..{. |
|00004710| 20 20 20 20 20 20 09 44 | 6f 50 61 75 73 65 28 29 | .D|oPause()|
|00004720| 3b 20 20 0a 09 7d 0a 09 | 0a 09 69 66 28 42 75 74 |; ..}..|..if(But|
|00004730| 74 6f 6e 28 29 29 0a 09 | 7b 0a 09 09 69 66 28 62 |ton())..|{...if(b|
|00004740| 61 6c 6c 44 6f 63 6b 65 | 64 20 3d 3d 20 74 72 75 |allDocke|d == tru|
|00004750| 65 29 0a 09 09 7b 0a 09 | 09 09 62 61 6c 6c 44 6f |e)...{..|..ballDo|
|00004760| 63 6b 65 64 20 3d 20 66 | 61 6c 73 65 3b 0a 09 09 |cked = f|alse;...|
|00004770| 09 62 61 6c 6c 56 65 6c | 6f 63 69 74 79 2e 68 20 |.ballVel|ocity.h |
|00004780| 3d 20 30 3b 0a 09 09 7d | 0a 09 7d 0a 09 0a 09 69 |= 0;...}|..}....i|
|00004790| 66 28 43 68 65 63 6b 4b | 65 79 4d 61 70 46 6f 72 |f(CheckK|eyMapFor|
|000047a0| 4b 65 79 28 6d 79 4b 65 | 79 4d 61 70 2c 20 38 2f |Key(myKe|yMap, 8/|
|000047b0| 2a 43 2a 2f 29 29 0a 09 | 7b 0a 09 09 45 72 61 73 |*C*/))..|{...Eras|
|000047c0| 65 57 6f 72 6b 4d 61 70 | 52 65 63 74 28 26 61 63 |eWorkMap|Rect(&ac|
|000047d0| 74 69 6f 6e 52 65 63 74 | 29 3b 0a 09 09 6c 65 76 |tionRect|);...lev|
|000047e0| 65 6c 20 3d 20 39 39 3b | 0a 09 09 53 65 74 75 70 |el = 99;|...Setup|
|000047f0| 56 61 72 73 46 6f 72 4e | 65 77 4c 65 76 65 6c 28 |VarsForN|ewLevel(|
|00004800| 6c 65 76 65 6c 29 3b 0a | 09 09 44 72 61 77 42 72 |level);.|..DrawBr|
|00004810| 69 63 6b 73 28 29 3b 0a | 09 09 6c 69 76 65 73 2b |icks();.|..lives+|
|00004820| 2b 3b 0a 09 09 0a 09 09 | 73 63 6f 72 65 20 3d 20 |+;......|score = |
|00004830| 73 63 6f 72 65 20 2b 20 | 34 30 3b 0a 09 7d 0a 7d |score + |40;..}.}|
|00004840| 0a 0a 42 6f 6f 6c 65 61 | 6e 20 43 68 65 63 6b 4b |..Boolea|n CheckK|
|00004850| 65 79 4d 61 70 46 6f 72 | 4b 65 79 28 4b 65 79 4d |eyMapFor|Key(KeyM|
|00004860| 61 70 20 74 68 65 4b 65 | 79 4d 61 70 2c 20 73 68 |ap theKe|yMap, sh|
|00004870| 6f 72 74 20 74 68 65 4b | 65 79 29 0a 7b 0a 09 73 |ort theK|ey).{..s|
|00004880| 68 6f 72 74 09 62 79 74 | 65 49 6e 64 65 78 3b 0a |hort.byt|eIndex;.|
|00004890| 09 63 68 61 72 09 74 68 | 65 42 79 74 65 2c 20 74 |.char.th|eByte, t|
|000048a0| 68 65 42 69 74 3b 0a 09 | 63 68 61 72 09 2a 74 68 |heBit;..|char.*th|
|000048b0| 65 50 6f 69 6e 74 65 72 | 3b 0a 09 0a 09 62 79 74 |ePointer|;....byt|
|000048c0| 65 49 6e 64 65 78 20 3d | 20 74 68 65 4b 65 79 20 |eIndex =| theKey |
|000048d0| 3e 3e 20 33 3b 0a 09 74 | 68 65 50 6f 69 6e 74 65 |>> 3;..t|hePointe|
|000048e0| 72 20 3d 20 28 63 68 61 | 72 20 2a 29 26 74 68 65 |r = (cha|r *)&the|
|000048f0| 4b 65 79 4d 61 70 5b 30 | 5d 3b 0a 09 74 68 65 42 |KeyMap[0|];..theB|
|00004900| 79 74 65 20 3d 20 2a 28 | 63 68 61 72 20 2a 29 28 |yte = *(|char *)(|
|00004910| 74 68 65 50 6f 69 6e 74 | 65 72 20 2b 20 62 79 74 |thePoint|er + byt|
|00004920| 65 49 6e 64 65 78 29 3b | 0a 09 74 68 65 42 69 74 |eIndex);|..theBit|
|00004930| 20 3d 20 31 4c 3c 3c 28 | 74 68 65 4b 65 79 20 26 | = 1L<<(|theKey &|
|00004940| 20 37 29 3b 0a 09 72 65 | 74 75 72 6e 28 20 28 74 | 7);..re|turn( (t|
|00004950| 68 65 42 79 74 65 20 26 | 20 74 68 65 42 69 74 29 |heByte &| theBit)|
|00004960| 20 21 3d 20 30 20 29 3b | 0a 7d 0a 0a 76 6f 69 64 | != 0 );|.}..void|
|00004970| 20 44 72 61 77 53 63 72 | 65 65 6e 28 76 6f 69 64 | DrawScr|een(void|
|00004980| 29 0a 7b 0a 09 63 6f 6e | 73 74 20 52 65 63 74 20 |).{..con|st Rect |
|00004990| 66 75 6c 6c 53 63 72 65 | 65 6e 20 3d 20 7b 30 2c |fullScre|en = {0,|
|000049a0| 20 30 2c 20 34 38 30 2c | 20 36 34 30 7d 3b 0a 20 | 0, 480,| 640};. |
|000049b0| 20 20 20 20 20 20 20 0a | 20 20 20 20 20 20 20 20 | .| |
|000049c0| 2f 2f 62 6c 69 74 20 74 | 68 65 20 62 69 67 20 73 |//blit t|he big s|
|000049d0| 74 61 72 74 75 70 20 50 | 69 63 0a 20 20 20 20 20 |tartup P|ic. |
|000049e0| 20 20 20 43 6f 70 79 42 | 69 74 73 28 28 42 69 74 | CopyB|its((Bit|
|000049f0| 4d 61 70 20 2a 29 2a 67 | 61 6d 65 53 63 72 65 65 |Map *)*g|ameScree|
|00004a00| 6e 50 69 78 2c 20 47 65 | 74 50 6f 72 74 42 69 74 |nPix, Ge|tPortBit|
|00004a10| 4d 61 70 46 6f 72 43 6f | 70 79 42 69 74 73 28 47 |MapForCo|pyBits(G|
|00004a20| 65 74 57 69 6e 64 6f 77 | 50 6f 72 74 28 67 61 6d |etWindow|Port(gam|
|00004a30| 65 57 69 6e 64 6f 77 29 | 29 2c 20 26 66 75 6c 6c |eWindow)|), &full|
|00004a40| 53 63 72 65 65 6e 2f 2a | 73 72 63 2a 2f 2c 20 26 |Screen/*|src*/, &|
|00004a50| 66 75 6c 6c 53 63 72 65 | 65 6e 2f 2a 64 65 73 74 |fullScre|en/*dest|
|00004a60| 2a 2f 2c 20 73 72 63 43 | 6f 70 79 2c 20 6e 69 6c |*/, srcC|opy, nil|
|00004a70| 29 3b 2f 2f 73 72 63 20 | 26 20 64 65 73 74 20 61 |);//src |& dest a|
|00004a80| 72 65 20 70 74 72 20 73 | 6f 20 74 68 65 72 65 20 |re ptr s|o there |
|00004a90| 69 73 20 6e 6f 20 6e 65 | 65 64 20 74 6f 20 27 26 |is no ne|ed to '&|
|00004aa0| 27 20 74 68 65 6d 0a 20 | 20 20 20 20 20 20 20 44 |' them. | D|
|00004ab0| 72 61 77 48 69 67 68 53 | 63 6f 72 65 28 29 3b 0a |rawHighS|core();.|
|00004ac0| 7d 0a 0a 73 68 6f 72 74 | 20 52 61 6e 64 28 73 68 |}..short| Rand(sh|
|00004ad0| 6f 72 74 20 72 61 6e 64 | 6f 6d 4f 66 29 0a 7b 0a |ort rand|omOf).{.|
|00004ae0| 09 73 68 6f 72 74 20 72 | 61 6e 64 6f 6d 56 61 6c |.short r|andomVal|
|00004af0| 75 65 3b 0a 09 64 6f 0a | 09 09 72 61 6e 64 6f 6d |ue;..do.|..random|
|00004b00| 56 61 6c 75 65 20 3d 20 | 28 52 61 6e 64 6f 6d 28 |Value = |(Random(|
|00004b10| 29 20 25 20 72 61 6e 64 | 6f 6d 4f 66 29 3b 0a 09 |) % rand|omOf);..|
|00004b20| 0a 09 09 77 68 69 6c 65 | 28 72 61 6e 64 6f 6d 56 |...while|(randomV|
|00004b30| 61 6c 75 65 20 3c 3d 20 | 2d 31 29 3b 0a 0a 09 72 |alue <= |-1);...r|
|00004b40| 65 74 75 72 6e 20 72 61 | 6e 64 6f 6d 56 61 6c 75 |eturn ra|ndomValu|
|00004b50| 65 3b 0a 7d 0a 0a 76 6f | 69 64 20 44 65 6c 61 79 |e;.}..vo|id Delay|
|00004b60| 46 6f 72 28 73 68 6f 72 | 74 20 6c 65 6e 67 74 68 |For(shor|t length|
|00004b70| 29 0a 7b 20 0a 09 6c 6f | 6e 67 20 74 65 6d 70 54 |).{ ..lo|ng tempT|
|00004b80| 69 63 6b 43 6f 75 6e 74 | 3b 0a 20 20 20 20 20 20 |ickCount|;. |
|00004b90| 20 20 45 76 65 6e 74 52 | 65 63 6f 72 64 20 74 68 | EventR|ecord th|
|00004ba0| 65 45 76 65 6e 74 3b 0a | 09 0a 09 74 65 6d 70 54 |eEvent;.|...tempT|
|00004bb0| 69 63 6b 43 6f 75 6e 74 | 20 3d 20 54 69 63 6b 43 |ickCount| = TickC|
|00004bc0| 6f 75 6e 74 28 29 3b 0a | 09 64 6f 0a 09 7b 0a 09 |ount();.|.do..{..|
|00004bd0| 09 47 65 74 4e 65 78 74 | 45 76 65 6e 74 28 65 76 |.GetNext|Event(ev|
|00004be0| 65 72 79 45 76 65 6e 74 | 2c 20 26 74 68 65 45 76 |eryEvent|, &theEv|
|00004bf0| 65 6e 74 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |ent);. | |
|00004c00| 20 20 20 20 20 20 48 61 | 6e 64 6c 65 45 76 65 6e | Ha|ndleEven|
|00004c10| 74 28 26 74 68 65 45 76 | 65 6e 74 29 3b 0a 09 7d |t(&theEv|ent);..}|
|00004c20| 0a 09 77 68 69 6c 65 28 | 74 65 6d 70 54 69 63 6b |..while(|tempTick|
|00004c30| 43 6f 75 6e 74 20 2b 20 | 6c 65 6e 67 74 68 20 3e |Count + |length >|
|00004c40| 3d 20 54 69 63 6b 43 6f | 75 6e 74 28 29 29 3b 0a |= TickCo|unt());.|
|00004c50| 7d 0a 0a 76 6f 69 64 20 | 4c 6f 61 64 53 63 6f 72 |}..void |LoadScor|
|00004c60| 65 28 76 6f 69 64 29 0a | 7b 0a 09 0a 7d 0a 0a 0a |e(void).|{...}...|
|00004c70| 0a 76 6f 69 64 20 53 61 | 76 65 53 63 6f 72 65 28 |.void Sa|veScore(|
|00004c80| 76 6f 69 64 29 0a 7b 0a | 09 0a 7d 0a 0a 0a 0a 73 |void).{.|..}....s|
|00004c90| 74 61 74 69 63 20 76 6f | 69 64 20 43 65 6e 74 65 |tatic vo|id Cente|
|00004ca0| 72 52 65 63 74 49 6e 52 | 65 63 74 28 52 65 63 74 |rRectInR|ect(Rect|
|00004cb0| 20 2a 73 6d 61 6c 6c 52 | 65 63 74 2c 20 52 65 63 | *smallR|ect, Rec|
|00004cc0| 74 20 2a 62 69 67 52 65 | 63 74 2c 20 52 65 63 74 |t *bigRe|ct, Rect|
|00004cd0| 20 2a 72 65 74 75 72 6e | 52 65 63 74 29 0a 7b 0a | *return|Rect).{.|
|00004ce0| 09 28 2a 72 65 74 75 72 | 6e 52 65 63 74 29 2e 6c |.(*retur|nRect).l|
|00004cf0| 65 66 74 20 3d 20 28 62 | 69 67 52 65 63 74 2d 3e |eft = (b|igRect->|
|00004d00| 72 69 67 68 74 20 2d 20 | 73 6d 61 6c 6c 52 65 63 |right - |smallRec|
|00004d10| 74 2d 3e 72 69 67 68 74 | 29 20 2f 20 32 3b 0a 09 |t->right|) / 2;..|
|00004d20| 28 2a 72 65 74 75 72 6e | 52 65 63 74 29 2e 72 69 |(*return|Rect).ri|
|00004d30| 67 68 74 20 3d 20 28 28 | 62 69 67 52 65 63 74 2d |ght = ((|bigRect-|
|00004d40| 3e 72 69 67 68 74 20 2d | 20 73 6d 61 6c 6c 52 65 |>right -| smallRe|
|00004d50| 63 74 2d 3e 72 69 67 68 | 74 29 20 2f 20 32 29 20 |ct->righ|t) / 2) |
|00004d60| 2b 20 73 6d 61 6c 6c 52 | 65 63 74 2d 3e 72 69 67 |+ smallR|ect->rig|
|00004d70| 68 74 3b 0a 09 0a 09 28 | 2a 72 65 74 75 72 6e 52 |ht;....(|*returnR|
|00004d80| 65 63 74 29 2e 74 6f 70 | 20 3d 20 28 62 69 67 52 |ect).top| = (bigR|
|00004d90| 65 63 74 2d 3e 62 6f 74 | 74 6f 6d 20 2d 20 73 6d |ect->bot|tom - sm|
|00004da0| 61 6c 6c 52 65 63 74 2d | 3e 62 6f 74 74 6f 6d 29 |allRect-|>bottom)|
|00004db0| 20 2f 20 32 3b 0a 09 28 | 2a 72 65 74 75 72 6e 52 | / 2;..(|*returnR|
|00004dc0| 65 63 74 29 2e 62 6f 74 | 74 6f 6d 20 3d 20 28 28 |ect).bot|tom = ((|
|00004dd0| 62 69 67 52 65 63 74 2d | 3e 62 6f 74 74 6f 6d 20 |bigRect-|>bottom |
|00004de0| 2d 20 73 6d 61 6c 6c 52 | 65 63 74 2d 3e 62 6f 74 |- smallR|ect->bot|
|00004df0| 74 6f 6d 29 20 2f 20 32 | 29 20 2b 20 73 6d 61 6c |tom) / 2|) + smal|
|00004e00| 6c 52 65 63 74 2d 3e 62 | 6f 74 74 6f 6d 3b 0a 7d |lRect->b|ottom;.}|
|00004e10| 0a 0a 0a 0a 23 70 72 61 | 67 6d 61 20 6d 61 72 6b |....#pra|gma mark|
|00004e20| 20 2d 0a 0a 0a 0a 65 78 | 74 65 72 6e 20 76 6f 69 | -....ex|tern voi|
|00004e30| 64 20 4d 6f 76 65 41 6e | 64 44 72 61 77 42 61 6c |d MoveAn|dDrawBal|
|00004e40| 6c 28 76 6f 69 64 29 0a | 7b 0a 09 52 65 63 74 20 |l(void).|{..Rect |
|00004e50| 72 69 67 68 74 33 3b 0a | 09 52 65 63 74 20 72 69 |right3;.|.Rect ri|
|00004e60| 67 68 74 32 3b 0a 09 52 | 65 63 74 20 72 69 67 68 |ght2;..R|ect righ|
|00004e70| 74 31 3b 0a 09 52 65 63 | 74 20 63 65 6e 74 65 72 |t1;..Rec|t center|
|00004e80| 3b 0a 09 52 65 63 74 20 | 6c 65 66 74 31 3b 0a 09 |;..Rect |left1;..|
|00004e90| 52 65 63 74 20 6c 65 66 | 74 32 3b 0a 09 52 65 63 |Rect lef|t2;..Rec|
|00004ea0| 74 20 6c 65 66 74 33 3b | 0a 09 0a 09 6f 6c 64 42 |t left3;|....oldB|
|00004eb0| 61 6c 6c 52 65 63 74 20 | 3d 20 62 61 6c 6c 52 65 |allRect |= ballRe|
|00004ec0| 63 74 3b 0a 09 0a 09 69 | 66 28 62 61 6c 6c 44 6f |ct;....i|f(ballDo|
|00004ed0| 63 6b 65 64 20 3d 3d 20 | 66 61 6c 73 65 29 0a 09 |cked == |false)..|
|00004ee0| 7b 0a 09 09 62 61 6c 6c | 52 65 63 74 2e 74 6f 70 |{...ball|Rect.top|
|00004ef0| 20 3d 20 62 61 6c 6c 52 | 65 63 74 2e 74 6f 70 20 | = ballR|ect.top |
|00004f00| 2b 20 62 61 6c 6c 56 65 | 6c 6f 63 69 74 79 2e 76 |+ ballVe|locity.v|
|00004f10| 3b 2f 2f 6d 6f 76 65 20 | 74 68 65 20 62 61 6c 6c |;//move |the ball|
|00004f20| 0a 09 09 62 61 6c 6c 52 | 65 63 74 2e 6c 65 66 74 |...ballR|ect.left|
|00004f30| 20 3d 20 62 61 6c 6c 52 | 65 63 74 2e 6c 65 66 74 | = ballR|ect.left|
|00004f40| 20 2b 20 62 61 6c 6c 56 | 65 6c 6f 63 69 74 79 2e | + ballV|elocity.|
|00004f50| 68 3b 0a 09 09 62 61 6c | 6c 52 65 63 74 2e 62 6f |h;...bal|lRect.bo|
|00004f60| 74 74 6f 6d 20 3d 20 62 | 61 6c 6c 52 65 63 74 2e |ttom = b|allRect.|
|00004f70| 62 6f 74 74 6f 6d 20 2b | 20 62 61 6c 6c 56 65 6c |bottom +| ballVel|
|00004f80| 6f 63 69 74 79 2e 76 3b | 0a 09 09 62 61 6c 6c 52 |ocity.v;|...ballR|
|00004f90| 65 63 74 2e 72 69 67 68 | 74 20 3d 20 62 61 6c 6c |ect.righ|t = ball|
|00004fa0| 52 65 63 74 2e 72 69 67 | 68 74 20 2b 20 62 61 6c |Rect.rig|ht + bal|
|00004fb0| 6c 56 65 6c 6f 63 69 74 | 79 2e 68 3b 0a 09 09 0a |lVelocit|y.h;....|
|00004fc0| 09 09 0a 09 09 43 68 65 | 63 6b 43 6f 6c 69 73 69 |.....Che|ckColisi|
|00004fd0| 6f 6e 57 69 74 68 42 72 | 69 63 6b 73 28 29 3b 0a |onWithBr|icks();.|
|00004fe0| 09 09 0a 09 09 6c 65 66 | 74 33 2e 6c 65 66 74 20 |.....lef|t3.left |
|00004ff0| 3d 20 70 61 64 64 6c 65 | 52 65 63 74 2e 6c 65 66 |= paddle|Rect.lef|
|00005000| 74 3b 0a 09 09 6c 65 66 | 74 33 2e 72 69 67 68 74 |t;...lef|t3.right|
|00005010| 20 3d 20 70 61 64 64 6c | 65 52 65 63 74 2e 6c 65 | = paddl|eRect.le|
|00005020| 66 74 20 2b 20 31 33 3b | 0a 09 09 6c 65 66 74 33 |ft + 13;|...left3|
|00005030| 2e 74 6f 70 20 3d 20 33 | 37 39 3b 0a 09 09 6c 65 |.top = 3|79;...le|
|00005040| 66 74 33 2e 62 6f 74 74 | 6f 6d 20 3d 20 33 39 38 |ft3.bott|om = 398|
|00005050| 3b 0a 09 09 0a 09 09 6c | 65 66 74 32 2e 6c 65 66 |;......l|eft2.lef|
|00005060| 74 20 3d 20 70 61 64 64 | 6c 65 52 65 63 74 2e 6c |t = padd|leRect.l|
|00005070| 65 66 74 20 2b 20 31 33 | 3b 0a 09 09 6c 65 66 74 |eft + 13|;...left|
|00005080| 32 2e 72 69 67 68 74 20 | 3d 20 70 61 64 64 6c 65 |2.right |= paddle|
|00005090| 52 65 63 74 2e 6c 65 66 | 74 20 2b 20 32 36 3b 0a |Rect.lef|t + 26;.|
|000050a0| 09 09 6c 65 66 74 32 2e | 74 6f 70 20 3d 20 33 37 |..left2.|top = 37|
|000050b0| 39 3b 0a 09 09 6c 65 66 | 74 32 2e 62 6f 74 74 6f |9;...lef|t2.botto|
|000050c0| 6d 20 3d 20 33 39 38 3b | 0a 09 09 0a 09 09 6c 65 |m = 398;|......le|
|000050d0| 66 74 31 2e 6c 65 66 74 | 20 3d 20 70 61 64 64 6c |ft1.left| = paddl|
|000050e0| 65 52 65 63 74 2e 6c 65 | 66 74 20 2b 20 32 36 3b |eRect.le|ft + 26;|
|000050f0| 0a 09 09 6c 65 66 74 31 | 2e 72 69 67 68 74 20 3d |...left1|.right =|
|00005100| 20 70 61 64 64 6c 65 52 | 65 63 74 2e 6c 65 66 74 | paddleR|ect.left|
|00005110| 20 2b 20 33 39 3b 0a 09 | 09 6c 65 66 74 31 2e 74 | + 39;..|.left1.t|
|00005120| 6f 70 20 3d 20 33 37 39 | 3b 0a 09 09 6c 65 66 74 |op = 379|;...left|
|00005130| 31 2e 62 6f 74 74 6f 6d | 20 3d 20 33 39 38 3b 0a |1.bottom| = 398;.|
|00005140| 09 09 0a 09 09 63 65 6e | 74 65 72 2e 6c 65 66 74 |.....cen|ter.left|
|00005150| 20 3d 20 70 61 64 64 6c | 65 52 65 63 74 2e 6c 65 | = paddl|eRect.le|
|00005160| 66 74 20 2b 20 33 39 3b | 0a 09 09 63 65 6e 74 65 |ft + 39;|...cente|
|00005170| 72 2e 72 69 67 68 74 20 | 3d 20 70 61 64 64 6c 65 |r.right |= paddle|
|00005180| 52 65 63 74 2e 6c 65 66 | 74 20 2b 20 35 33 3b 0a |Rect.lef|t + 53;.|
|00005190| 09 09 63 65 6e 74 65 72 | 2e 74 6f 70 20 3d 20 33 |..center|.top = 3|
|000051a0| 37 39 3b 0a 09 09 63 65 | 6e 74 65 72 2e 62 6f 74 |79;...ce|nter.bot|
|000051b0| 74 6f 6d 20 3d 20 33 39 | 38 3b 0a 09 09 0a 09 09 |tom = 39|8;......|
|000051c0| 72 69 67 68 74 31 2e 6c | 65 66 74 20 3d 20 70 61 |right1.l|eft = pa|
|000051d0| 64 64 6c 65 52 65 63 74 | 2e 6c 65 66 74 20 2b 20 |ddleRect|.left + |
|000051e0| 35 33 3b 0a 09 09 72 69 | 67 68 74 31 2e 72 69 67 |53;...ri|ght1.rig|
|000051f0| 68 74 20 3d 20 70 61 64 | 64 6c 65 52 65 63 74 2e |ht = pad|dleRect.|
|00005200| 6c 65 66 74 20 2b 20 36 | 36 3b 0a 09 09 72 69 67 |left + 6|6;...rig|
|00005210| 68 74 31 2e 74 6f 70 20 | 3d 20 33 37 39 3b 0a 09 |ht1.top |= 379;..|
|00005220| 09 72 69 67 68 74 31 2e | 62 6f 74 74 6f 6d 20 3d |.right1.|bottom =|
|00005230| 20 33 39 38 3b 0a 09 09 | 0a 09 09 72 69 67 68 74 | 398;...|...right|
|00005240| 32 2e 6c 65 66 74 20 3d | 20 70 61 64 64 6c 65 52 |2.left =| paddleR|
|00005250| 65 63 74 2e 6c 65 66 74 | 20 2b 20 36 36 3b 0a 09 |ect.left| + 66;..|
|00005260| 09 72 69 67 68 74 32 2e | 72 69 67 68 74 20 3d 20 |.right2.|right = |
|00005270| 70 61 64 64 6c 65 52 65 | 63 74 2e 6c 65 66 74 20 |paddleRe|ct.left |
|00005280| 2b 20 37 39 3b 0a 09 09 | 72 69 67 68 74 32 2e 74 |+ 79;...|right2.t|
|00005290| 6f 70 20 3d 20 33 37 39 | 3b 0a 09 09 72 69 67 68 |op = 379|;...righ|
|000052a0| 74 32 2e 62 6f 74 74 6f | 6d 20 3d 20 33 39 38 3b |t2.botto|m = 398;|
|000052b0| 0a 09 09 0a 09 09 72 69 | 67 68 74 33 2e 6c 65 66 |......ri|ght3.lef|
|000052c0| 74 20 3d 20 70 61 64 64 | 6c 65 52 65 63 74 2e 6c |t = padd|leRect.l|
|000052d0| 65 66 74 20 2b 20 37 39 | 3b 0a 09 09 72 69 67 68 |eft + 79|;...righ|
|000052e0| 74 33 2e 72 69 67 68 74 | 20 3d 20 70 61 64 64 6c |t3.right| = paddl|
|000052f0| 65 52 65 63 74 2e 6c 65 | 66 74 20 2b 20 39 32 3b |eRect.le|ft + 92;|
|00005300| 0a 09 09 72 69 67 68 74 | 33 2e 74 6f 70 20 3d 20 |...right|3.top = |
|00005310| 33 37 39 3b 0a 09 09 72 | 69 67 68 74 33 2e 62 6f |379;...r|ight3.bo|
|00005320| 74 74 6f 6d 20 3d 20 33 | 39 38 3b 0a 09 09 0a 09 |ttom = 3|98;.....|
|00005330| 09 69 66 28 53 65 63 74 | 52 65 63 74 28 26 62 61 |.if(Sect|Rect(&ba|
|00005340| 6c 6c 52 65 63 74 2c 20 | 26 6c 65 66 74 33 2c 20 |llRect, |&left3, |
|00005350| 6e 69 6c 29 20 3d 3d 20 | 74 72 75 65 29 0a 09 09 |nil) == |true)...|
|00005360| 7b 0a 09 09 09 62 61 6c | 6c 56 65 6c 6f 63 69 74 |{....bal|lVelocit|
|00005370| 79 2e 68 20 2b 3d 20 2d | 31 35 3b 0a 09 09 09 62 |y.h += -|15;....b|
|00005380| 61 6c 6c 52 65 63 74 2e | 74 6f 70 20 3d 20 33 36 |allRect.|top = 36|
|00005390| 32 3b 0a 09 09 09 62 61 | 6c 6c 52 65 63 74 2e 62 |2;....ba|llRect.b|
|000053a0| 6f 74 74 6f 6d 20 3d 20 | 33 37 39 3b 0a 09 09 09 |ottom = |379;....|
|000053b0| 62 61 6c 6c 56 65 6c 6f | 63 69 74 79 2e 76 20 3d |ballVelo|city.v =|
|000053c0| 20 2d 62 61 6c 6c 56 65 | 6c 6f 63 69 74 79 2e 76 | -ballVe|locity.v|
|000053d0| 3b 0a 09 09 09 62 61 6c | 6c 56 65 6c 6f 63 69 74 |;....bal|lVelocit|
|000053e0| 79 2e 68 20 2b 3d 20 6d | 6f 76 65 6d 65 6e 74 3b |y.h += m|ovement;|
|000053f0| 0a 09 09 09 50 6c 61 79 | 53 6e 64 4e 75 6d 28 31 |....Play|SndNum(1|
|00005400| 29 3b 0a 09 09 7d 0a 09 | 09 69 66 28 53 65 63 74 |);...}..|.if(Sect|
|00005410| 52 65 63 74 28 26 62 61 | 6c 6c 52 65 63 74 2c 20 |Rect(&ba|llRect, |
|00005420| 26 6c 65 66 74 32 2c 20 | 6e 69 6c 29 20 3d 3d 20 |&left2, |nil) == |
|00005430| 74 72 75 65 29 0a 09 09 | 7b 0a 09 09 09 62 61 6c |true)...|{....bal|
|00005440| 6c 56 65 6c 6f 63 69 74 | 79 2e 68 20 2b 3d 20 2d |lVelocit|y.h += -|
|00005450| 31 30 3b 0a 09 09 09 62 | 61 6c 6c 52 65 63 74 2e |10;....b|allRect.|
|00005460| 74 6f 70 20 3d 20 33 36 | 32 3b 0a 09 09 09 62 61 |top = 36|2;....ba|
|00005470| 6c 6c 52 65 63 74 2e 62 | 6f 74 74 6f 6d 20 3d 20 |llRect.b|ottom = |
|00005480| 33 37 39 3b 0a 09 09 09 | 62 61 6c 6c 56 65 6c 6f |379;....|ballVelo|
|00005490| 63 69 74 79 2e 76 20 3d | 20 2d 62 61 6c 6c 56 65 |city.v =| -ballVe|
|000054a0| 6c 6f 63 69 74 79 2e 76 | 3b 0a 09 09 09 62 61 6c |locity.v|;....bal|
|000054b0| 6c 56 65 6c 6f 63 69 74 | 79 2e 68 20 2b 3d 20 6d |lVelocit|y.h += m|
|000054c0| 6f 76 65 6d 65 6e 74 3b | 0a 09 09 09 50 6c 61 79 |ovement;|....Play|
|000054d0| 53 6e 64 4e 75 6d 28 31 | 29 3b 0a 09 09 7d 0a 09 |SndNum(1|);...}..|
|000054e0| 09 69 66 28 53 65 63 74 | 52 65 63 74 28 26 62 61 |.if(Sect|Rect(&ba|
|000054f0| 6c 6c 52 65 63 74 2c 20 | 26 6c 65 66 74 31 2c 20 |llRect, |&left1, |
|00005500| 6e 69 6c 29 20 3d 3d 20 | 74 72 75 65 29 0a 09 09 |nil) == |true)...|
|00005510| 7b 0a 09 09 09 62 61 6c | 6c 56 65 6c 6f 63 69 74 |{....bal|lVelocit|
|00005520| 79 2e 68 20 2b 3d 20 2d | 35 3b 0a 09 09 09 62 61 |y.h += -|5;....ba|
|00005530| 6c 6c 52 65 63 74 2e 74 | 6f 70 20 3d 20 33 36 32 |llRect.t|op = 362|
|00005540| 3b 0a 09 09 09 62 61 6c | 6c 52 65 63 74 2e 62 6f |;....bal|lRect.bo|
|00005550| 74 74 6f 6d 20 3d 20 33 | 37 39 3b 0a 09 09 09 62 |ttom = 3|79;....b|
|00005560| 61 6c 6c 56 65 6c 6f 63 | 69 74 79 2e 76 20 3d 20 |allVeloc|ity.v = |
|00005570| 2d 62 61 6c 6c 56 65 6c | 6f 63 69 74 79 2e 76 3b |-ballVel|ocity.v;|
|00005580| 0a 09 09 09 62 61 6c 6c | 56 65 6c 6f 63 69 74 79 |....ball|Velocity|
|00005590| 2e 68 20 2b 3d 20 6d 6f | 76 65 6d 65 6e 74 3b 0a |.h += mo|vement;.|
|000055a0| 09 09 09 50 6c 61 79 53 | 6e 64 4e 75 6d 28 31 29 |...PlayS|ndNum(1)|
|000055b0| 3b 0a 09 09 7d 0a 09 09 | 69 66 28 53 65 63 74 52 |;...}...|if(SectR|
|000055c0| 65 63 74 28 26 62 61 6c | 6c 52 65 63 74 2c 20 26 |ect(&bal|lRect, &|
|000055d0| 63 65 6e 74 65 72 2c 20 | 6e 69 6c 29 20 3d 3d 20 |center, |nil) == |
|000055e0| 74 72 75 65 29 0a 09 09 | 7b 0a 09 09 09 62 61 6c |true)...|{....bal|
|000055f0| 6c 56 65 6c 6f 63 69 74 | 79 2e 68 20 2b 3d 20 30 |lVelocit|y.h += 0|
|00005600| 3b 0a 09 09 09 62 61 6c | 6c 52 65 63 74 2e 74 6f |;....bal|lRect.to|
|00005610| 70 20 3d 20 33 36 32 3b | 0a 09 09 09 62 61 6c 6c |p = 362;|....ball|
|00005620| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 20 3d 20 33 37 |Rect.bot|tom = 37|
|00005630| 39 3b 0a 09 09 09 62 61 | 6c 6c 56 65 6c 6f 63 69 |9;....ba|llVeloci|
|00005640| 74 79 2e 76 20 3d 20 2d | 62 61 6c 6c 56 65 6c 6f |ty.v = -|ballVelo|
|00005650| 63 69 74 79 2e 76 3b 0a | 09 09 09 62 61 6c 6c 56 |city.v;.|...ballV|
|00005660| 65 6c 6f 63 69 74 79 2e | 68 20 2b 3d 20 6d 6f 76 |elocity.|h += mov|
|00005670| 65 6d 65 6e 74 3b 0a 09 | 09 09 50 6c 61 79 53 6e |ement;..|..PlaySn|
|00005680| 64 4e 75 6d 28 31 29 3b | 0a 09 09 7d 0a 09 09 69 |dNum(1);|...}...i|
|00005690| 66 28 53 65 63 74 52 65 | 63 74 28 26 62 61 6c 6c |f(SectRe|ct(&ball|
|000056a0| 52 65 63 74 2c 20 26 72 | 69 67 68 74 31 2c 20 6e |Rect, &r|ight1, n|
|000056b0| 69 6c 29 20 3d 3d 20 74 | 72 75 65 29 0a 09 09 7b |il) == t|rue)...{|
|000056c0| 0a 09 09 09 62 61 6c 6c | 56 65 6c 6f 63 69 74 79 |....ball|Velocity|
|000056d0| 2e 68 20 2b 3d 20 35 3b | 0a 09 09 09 62 61 6c 6c |.h += 5;|....ball|
|000056e0| 52 65 63 74 2e 74 6f 70 | 20 3d 20 33 36 32 3b 0a |Rect.top| = 362;.|
|000056f0| 09 09 09 62 61 6c 6c 52 | 65 63 74 2e 62 6f 74 74 |...ballR|ect.bott|
|00005700| 6f 6d 20 3d 20 33 37 39 | 3b 0a 09 09 09 62 61 6c |om = 379|;....bal|
|00005710| 6c 56 65 6c 6f 63 69 74 | 79 2e 76 20 3d 20 2d 62 |lVelocit|y.v = -b|
|00005720| 61 6c 6c 56 65 6c 6f 63 | 69 74 79 2e 76 3b 0a 09 |allVeloc|ity.v;..|
|00005730| 09 09 62 61 6c 6c 56 65 | 6c 6f 63 69 74 79 2e 68 |..ballVe|locity.h|
|00005740| 20 2b 3d 20 6d 6f 76 65 | 6d 65 6e 74 3b 0a 09 09 | += move|ment;...|
|00005750| 09 50 6c 61 79 53 6e 64 | 4e 75 6d 28 31 29 3b 0a |.PlaySnd|Num(1);.|
|00005760| 09 09 7d 0a 09 09 69 66 | 28 53 65 63 74 52 65 63 |..}...if|(SectRec|
|00005770| 74 28 26 62 61 6c 6c 52 | 65 63 74 2c 20 26 72 69 |t(&ballR|ect, &ri|
|00005780| 67 68 74 32 2c 20 6e 69 | 6c 29 20 3d 3d 20 74 72 |ght2, ni|l) == tr|
|00005790| 75 65 29 0a 09 09 7b 0a | 09 09 09 62 61 6c 6c 56 |ue)...{.|...ballV|
|000057a0| 65 6c 6f 63 69 74 79 2e | 68 20 2b 3d 20 31 30 3b |elocity.|h += 10;|
|000057b0| 0a 09 09 09 62 61 6c 6c | 52 65 63 74 2e 74 6f 70 |....ball|Rect.top|
|000057c0| 20 3d 20 33 36 32 3b 0a | 09 09 09 62 61 6c 6c 52 | = 362;.|...ballR|
|000057d0| 65 63 74 2e 62 6f 74 74 | 6f 6d 20 3d 20 33 37 39 |ect.bott|om = 379|
|000057e0| 3b 0a 09 09 09 62 61 6c | 6c 56 65 6c 6f 63 69 74 |;....bal|lVelocit|
|000057f0| 79 2e 76 20 3d 20 2d 62 | 61 6c 6c 56 65 6c 6f 63 |y.v = -b|allVeloc|
|00005800| 69 74 79 2e 76 3b 0a 09 | 09 09 62 61 6c 6c 56 65 |ity.v;..|..ballVe|
|00005810| 6c 6f 63 69 74 79 2e 68 | 20 2b 3d 20 6d 6f 76 65 |locity.h| += move|
|00005820| 6d 65 6e 74 3b 0a 09 09 | 09 50 6c 61 79 53 6e 64 |ment;...|.PlaySnd|
|00005830| 4e 75 6d 28 31 29 3b 0a | 09 09 7d 0a 09 09 69 66 |Num(1);.|..}...if|
|00005840| 28 53 65 63 74 52 65 63 | 74 28 26 62 61 6c 6c 52 |(SectRec|t(&ballR|
|00005850| 65 63 74 2c 20 26 72 69 | 67 68 74 33 2c 20 6e 69 |ect, &ri|ght3, ni|
|00005860| 6c 29 20 3d 3d 20 74 72 | 75 65 29 0a 09 09 7b 0a |l) == tr|ue)...{.|
|00005870| 09 09 09 62 61 6c 6c 56 | 65 6c 6f 63 69 74 79 2e |...ballV|elocity.|
|00005880| 68 20 2b 3d 20 31 35 3b | 0a 09 09 09 62 61 6c 6c |h += 15;|....ball|
|00005890| 52 65 63 74 2e 74 6f 70 | 20 3d 20 33 36 32 3b 0a |Rect.top| = 362;.|
|000058a0| 09 09 09 62 61 6c 6c 52 | 65 63 74 2e 62 6f 74 74 |...ballR|ect.bott|
|000058b0| 6f 6d 20 3d 20 33 37 39 | 3b 0a 09 09 09 62 61 6c |om = 379|;....bal|
|000058c0| 6c 56 65 6c 6f 63 69 74 | 79 2e 76 20 3d 20 2d 62 |lVelocit|y.v = -b|
|000058d0| 61 6c 6c 56 65 6c 6f 63 | 69 74 79 2e 76 3b 0a 09 |allVeloc|ity.v;..|
|000058e0| 09 09 62 61 6c 6c 56 65 | 6c 6f 63 69 74 79 2e 68 |..ballVe|locity.h|
|000058f0| 20 2b 3d 20 6d 6f 76 65 | 6d 65 6e 74 3b 0a 09 09 | += move|ment;...|
|00005900| 09 50 6c 61 79 53 6e 64 | 4e 75 6d 28 31 29 3b 0a |.PlaySnd|Num(1);.|
|00005910| 09 09 7d 0a 09 09 0a 09 | 09 69 66 28 62 61 6c 6c |..}.....|.if(ball|
|00005920| 56 65 6c 6f 63 69 74 79 | 2e 68 20 3e 20 6d 61 78 |Velocity|.h > max|
|00005930| 48 53 70 65 65 64 29 0a | 09 09 09 62 61 6c 6c 56 |HSpeed).|...ballV|
|00005940| 65 6c 6f 63 69 74 79 2e | 68 20 3d 20 6d 61 78 48 |elocity.|h = maxH|
|00005950| 53 70 65 65 64 3b 0a 09 | 09 0a 09 09 69 66 28 62 |Speed;..|....if(b|
|00005960| 61 6c 6c 56 65 6c 6f 63 | 69 74 79 2e 68 20 3c 20 |allVeloc|ity.h < |
|00005970| 2d 6d 61 78 48 53 70 65 | 65 64 29 0a 09 09 09 62 |-maxHSpe|ed)....b|
|00005980| 61 6c 6c 56 65 6c 6f 63 | 69 74 79 2e 68 20 3d 20 |allVeloc|ity.h = |
|00005990| 2d 6d 61 78 48 53 70 65 | 65 64 3b 0a 09 09 0a 09 |-maxHSpe|ed;.....|
|000059a0| 09 69 66 28 62 61 6c 6c | 52 65 63 74 2e 74 6f 70 |.if(ball|Rect.top|
|000059b0| 20 3c 20 31 39 29 2f 2f | 63 68 65 63 6b 20 66 6f | < 19)//|check fo|
|000059c0| 72 20 63 6f 6c 69 73 69 | 6f 6e 20 77 69 74 68 20 |r colisi|on with |
|000059d0| 73 63 72 65 65 6e 20 74 | 6f 70 0a 09 09 7b 0a 09 |screen t|op...{..|
|000059e0| 09 09 62 61 6c 6c 56 65 | 6c 6f 63 69 74 79 2e 76 |..ballVe|locity.v|
|000059f0| 20 3d 20 2d 62 61 6c 6c | 56 65 6c 6f 63 69 74 79 | = -ball|Velocity|
|00005a00| 2e 76 3b 0a 09 09 09 62 | 61 6c 6c 52 65 63 74 2e |.v;....b|allRect.|
|00005a10| 74 6f 70 20 3d 20 31 39 | 3b 0a 09 09 09 62 61 6c |top = 19|;....bal|
|00005a20| 6c 52 65 63 74 2e 62 6f | 74 74 6f 6d 20 3d 20 33 |lRect.bo|ttom = 3|
|00005a30| 36 3b 0a 09 09 09 50 6c | 61 79 53 6e 64 4e 75 6d |6;....Pl|aySndNum|
|00005a40| 28 32 29 3b 0a 09 09 7d | 0a 09 09 0a 09 09 69 66 |(2);...}|......if|
|00005a50| 28 62 61 6c 6c 52 65 63 | 74 2e 6c 65 66 74 20 3c |(ballRec|t.left <|
|00005a60| 20 31 39 29 2f 2f 63 68 | 65 63 6b 20 66 6f 72 20 | 19)//ch|eck for |
|00005a70| 63 6f 6c 69 73 69 6f 6e | 20 77 69 74 68 20 73 63 |colision| with sc|
|00005a80| 72 65 65 6e 20 6c 65 66 | 74 0a 09 09 7b 0a 09 09 |reen lef|t...{...|
|00005a90| 09 62 61 6c 6c 56 65 6c | 6f 63 69 74 79 2e 68 20 |.ballVel|ocity.h |
|00005aa0| 3d 20 2d 62 61 6c 6c 56 | 65 6c 6f 63 69 74 79 2e |= -ballV|elocity.|
|00005ab0| 68 3b 0a 09 09 09 62 61 | 6c 6c 52 65 63 74 2e 6c |h;....ba|llRect.l|
|00005ac0| 65 66 74 20 3d 20 31 39 | 3b 0a 09 09 09 62 61 6c |eft = 19|;....bal|
|00005ad0| 6c 52 65 63 74 2e 72 69 | 67 68 74 20 3d 20 33 36 |lRect.ri|ght = 36|
|00005ae0| 3b 0a 09 09 09 50 6c 61 | 79 53 6e 64 4e 75 6d 28 |;....Pla|ySndNum(|
|00005af0| 32 29 3b 0a 09 09 7d 0a | 09 09 0a 09 09 69 66 28 |2);...}.|.....if(|
|00005b00| 62 61 6c 6c 52 65 63 74 | 2e 62 6f 74 74 6f 6d 20 |ballRect|.bottom |
|00005b10| 3e 20 34 35 39 29 2f 2f | 63 68 65 63 6b 20 66 6f |> 459)//|check fo|
|00005b20| 72 20 63 6f 6c 69 73 69 | 6f 6e 20 77 69 74 68 20 |r colisi|on with |
|00005b30| 73 63 72 65 65 6e 20 62 | 6f 74 74 6f 6d 0a 09 09 |screen b|ottom...|
|00005b40| 7b 0a 09 09 09 2f 2f 74 | 68 65 20 70 6c 61 79 65 |{....//t|he playe|
|00005b50| 72 20 69 73 20 64 65 61 | 64 0a 09 09 09 0a 09 09 |r is dea|d.......|
|00005b60| 09 53 69 6c 65 6e 63 65 | 43 68 61 6e 6e 65 6c 28 |.Silence|Channel(|
|00005b70| 6d 75 73 69 63 43 68 61 | 6e 6e 65 6c 29 3b 0a 09 |musicCha|nnel);..|
|00005b80| 09 09 0a 09 09 09 6c 69 | 76 65 73 2d 2d 3b 0a 09 |......li|ves--;..|
|00005b90| 09 09 0a 09 09 09 44 65 | 6c 61 79 46 6f 72 28 36 |......De|layFor(6|
|00005ba0| 30 29 3b 0a 09 09 09 0a | 20 20 20 20 20 20 20 20 |0);.....| |
|00005bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005bc0| 2f 2f 47 61 6d 65 20 4f | 76 65 72 0a 09 09 09 69 |//Game O|ver....i|
|00005bd0| 66 28 6c 69 76 65 73 20 | 3d 3d 20 2d 31 29 0a 09 |f(lives |== -1)..|
|00005be0| 09 09 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |..{. | |
|00005bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c00| 20 20 20 20 44 65 6c 61 | 79 46 6f 72 28 36 30 29 | Dela|yFor(60)|
|00005c10| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00005c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c30| 20 20 69 66 28 67 53 6f | 75 6e 64 4f 6e 29 0a 20 | if(gSo|undOn). |
|00005c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c60| 20 20 20 53 6e 64 50 6c | 61 79 28 67 61 6d 65 53 | SndPl|ay(gameS|
|00005c70| 6e 64 43 68 61 6e 6e 65 | 6c 2c 20 28 53 6e 64 4c |ndChanne|l, (SndL|
|00005c80| 69 73 74 48 61 6e 64 6c | 65 29 67 61 6d 65 4f 76 |istHandl|e)gameOv|
|00005c90| 65 72 53 6e 64 2c 20 74 | 72 75 65 29 3b 0a 09 09 |erSnd, t|rue);...|
|00005ca0| 09 09 0a 09 09 09 09 0a | 09 09 09 09 44 69 73 70 |........|....Disp|
|00005cb0| 6c 61 79 47 61 6d 65 4f | 76 65 72 53 69 67 6e 28 |layGameO|verSign(|
|00005cc0| 29 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |);. | |
|00005cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005ce0| 20 20 20 0a 09 09 09 09 | 45 6e 64 47 61 6d 65 28 | .....|EndGame(|
|00005cf0| 29 3b 09 09 09 0a 09 09 | 09 09 72 65 74 75 72 6e |);......|..return|
|00005d00| 3b 0a 09 09 09 7d 0a 20 | 20 20 20 20 20 20 20 20 |;....}. | |
|00005d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 0a | | .|
|00005d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d30| 20 20 20 20 20 20 20 20 | 0a 09 09 09 62 61 6c 6c | |....ball|
|00005d40| 52 65 63 74 2e 74 6f 70 | 20 3d 20 34 34 32 3b 0a |Rect.top| = 442;.|
|00005d50| 09 09 09 62 61 6c 6c 52 | 65 63 74 2e 62 6f 74 74 |...ballR|ect.bott|
|00005d60| 6f 6d 20 3d 20 34 35 39 | 3b 0a 20 20 09 09 09 42 |om = 459|;. ...B|
|00005d70| 6c 69 74 53 70 72 69 74 | 65 54 6f 57 6f 72 6b 4d |litSprit|eToWorkM|
|00005d80| 61 70 28 30 2c 20 26 62 | 61 6c 6c 52 65 63 74 29 |ap(0, &b|allRect)|
|00005d90| 3b 0a 09 09 09 0a 09 09 | 09 69 66 28 67 53 6f 75 |;.......|.if(gSou|
|00005da0| 6e 64 4f 6e 29 0a 09 09 | 09 09 53 6e 64 50 6c 61 |ndOn)...|..SndPla|
|00005db0| 79 28 67 61 6d 65 53 6e | 64 43 68 61 6e 6e 65 6c |y(gameSn|dChannel|
|00005dc0| 2c 20 28 53 6e 64 4c 69 | 73 74 48 61 6e 64 6c 65 |, (SndLi|stHandle|
|00005dd0| 29 64 65 61 74 68 53 6e | 64 2c 20 66 61 6c 73 65 |)deathSn|d, false|
|00005de0| 29 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |);. | |
|00005df0| 20 20 20 20 20 20 20 20 | 20 20 20 0a 09 09 09 44 | | ....D|
|00005e00| 65 6c 61 79 46 6f 72 28 | 33 30 29 3b 20 2f 2f 67 |elayFor(|30); //g|
|00005e10| 69 76 65 20 74 68 65 20 | 70 6c 61 79 65 72 20 74 |ive the |player t|
|00005e20| 69 6d 65 20 74 6f 20 66 | 65 65 6c 20 68 69 73 20 |ime to f|eel his |
|00005e30| 70 6c 69 67 68 74 0a 09 | 09 09 09 0a 09 09 09 45 |plight..|.......E|
|00005e40| 72 61 73 65 57 6f 72 6b | 4d 61 70 52 65 63 74 28 |raseWork|MapRect(|
|00005e50| 26 62 61 6c 6c 52 65 63 | 74 29 3b 0a 09 09 09 0a |&ballRec|t);.....|
|00005e60| 09 09 09 44 72 61 77 42 | 61 6c 6c 73 28 6c 69 76 |...DrawB|alls(liv|
|00005e70| 65 73 29 3b 0a 09 09 09 | 0a 09 09 09 62 61 6c 6c |es);....|....ball|
|00005e80| 44 6f 63 6b 65 64 20 3d | 20 74 72 75 65 3b 0a 09 |Docked =| true;..|
|00005e90| 09 09 62 61 6c 6c 56 65 | 6c 6f 63 69 74 79 2e 76 |..ballVe|locity.v|
|00005ea0| 20 3d 20 2d 62 61 6c 6c | 56 65 6c 6f 63 69 74 79 | = -ball|Velocity|
|00005eb0| 2e 76 3b 2f 2f 77 68 65 | 6e 20 74 68 65 20 70 6c |.v;//whe|n the pl|
|00005ec0| 61 79 65 72 20 64 69 65 | 73 20 74 68 65 20 62 61 |ayer die|s the ba|
|00005ed0| 6c 6c 20 69 73 20 67 6f | 69 6e 67 20 64 6f 77 6e |ll is go|ing down|
|00005ee0| 20 73 6f 20 69 74 20 6d | 75 73 74 20 62 65 20 74 | so it m|ust be t|
|00005ef0| 75 72 6e 65 64 20 61 72 | 6f 75 6e 64 20 6f 72 20 |urned ar|ound or |
|00005f00| 65 6c 73 65 20 69 74 20 | 77 69 6c 6c 20 67 6f 20 |else it |will go |
|00005f10| 64 6f 77 6e 20 77 68 65 | 6e 20 74 68 65 20 70 6c |down whe|n the pl|
|00005f20| 61 79 65 72 20 73 74 61 | 72 74 73 20 61 20 6e 65 |ayer sta|rts a ne|
|00005f30| 77 20 6c 69 66 65 0a 09 | 09 09 0a 20 20 20 20 20 |w life..|... |
|00005f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f50| 20 20 20 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00005f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 0a 09 09 09 | | ....|
|00005f70| 42 6c 69 74 57 6f 72 6b | 4d 61 70 54 6f 53 63 72 |BlitWork|MapToScr|
|00005f80| 65 65 6e 28 29 3b 0a 09 | 09 09 0a 09 09 09 44 69 |een();..|......Di|
|00005f90| 73 70 6c 61 79 52 65 61 | 64 79 53 69 67 6e 28 29 |splayRea|dySign()|
|00005fa0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00005fb0| 20 20 20 20 20 20 20 20 | 20 20 0a 09 09 7d 0a 09 | | ...}..|
|00005fc0| 09 0a 09 09 69 66 28 62 | 61 6c 6c 52 65 63 74 2e |....if(b|allRect.|
|00005fd0| 72 69 67 68 74 20 3e 20 | 34 37 39 29 2f 2f 63 68 |right > |479)//ch|
|00005fe0| 65 63 6b 20 66 6f 72 20 | 63 6f 6c 69 73 69 6f 6e |eck for |colision|
|00005ff0| 20 77 69 74 68 20 73 63 | 72 65 65 6e 20 72 69 67 | with sc|reen rig|
|00006000| 68 74 0a 09 09 7b 0a 09 | 09 09 62 61 6c 6c 56 65 |ht...{..|..ballVe|
|00006010| 6c 6f 63 69 74 79 2e 68 | 20 3d 20 2d 62 61 6c 6c |locity.h| = -ball|
|00006020| 56 65 6c 6f 63 69 74 79 | 2e 68 3b 0a 09 09 09 62 |Velocity|.h;....b|
|00006030| 61 6c 6c 52 65 63 74 2e | 6c 65 66 74 20 3d 20 34 |allRect.|left = 4|
|00006040| 36 32 3b 0a 09 09 09 62 | 61 6c 6c 52 65 63 74 2e |62;....b|allRect.|
|00006050| 72 69 67 68 74 20 3d 20 | 34 37 39 3b 0a 09 09 09 |right = |479;....|
|00006060| 50 6c 61 79 53 6e 64 4e | 75 6d 28 32 29 3b 0a 09 |PlaySndN|um(2);..|
|00006070| 09 7d 0a 09 7d 0a 09 0a | 09 0a 09 0a 09 69 66 28 |.}..}...|.....if(|
|00006080| 62 61 6c 6c 44 6f 63 6b | 65 64 20 3d 3d 20 74 72 |ballDock|ed == tr|
|00006090| 75 65 29 0a 09 7b 0a 09 | 09 62 61 6c 6c 52 65 63 |ue)..{..|.ballRec|
|000060a0| 74 2e 6c 65 66 74 20 3d | 20 70 61 64 64 6c 65 52 |t.left =| paddleR|
|000060b0| 65 63 74 2e 6c 65 66 74 | 20 2b 20 33 37 3b 0a 09 |ect.left| + 37;..|
|000060c0| 09 62 61 6c 6c 52 65 63 | 74 2e 72 69 67 68 74 20 |.ballRec|t.right |
|000060d0| 3d 20 70 61 64 64 6c 65 | 52 65 63 74 2e 6c 65 66 |= paddle|Rect.lef|
|000060e0| 74 20 2b 20 35 34 3b 0a | 09 09 62 61 6c 6c 52 65 |t + 54;.|..ballRe|
|000060f0| 63 74 2e 74 6f 70 20 3d | 20 33 36 32 3b 0a 09 09 |ct.top =| 362;...|
|00006100| 62 61 6c 6c 52 65 63 74 | 2e 62 6f 74 74 6f 6d 20 |ballRect|.bottom |
|00006110| 3d 20 33 37 39 3b 0a 09 | 7d 0a 09 0a 09 42 6c 69 |= 379;..|}....Bli|
|00006120| 74 53 70 72 69 74 65 54 | 6f 57 6f 72 6b 4d 61 70 |tSpriteT|oWorkMap|
|00006130| 28 30 2c 20 26 62 61 6c | 6c 52 65 63 74 29 3b 0a |(0, &bal|lRect);.|
|00006140| 09 0a 09 2f 2a 4e 6f 74 | 65 20 69 66 20 74 68 65 |.../*Not|e if the|
|00006150| 20 70 6c 61 79 65 72 20 | 64 69 65 73 20 74 68 69 | player |dies thi|
|00006160| 73 20 66 72 61 6d 65 20 | 62 6f 74 68 20 69 66 73 |s frame |both ifs|
|00006170| 20 61 72 65 20 65 78 65 | 63 75 74 65 2a 2f 0a 7d | are exe|cute*/.}|
|00006180| 0a 0a 76 6f 69 64 20 4d | 6f 76 65 41 6e 64 44 72 |..void M|oveAndDr|
|00006190| 61 77 50 61 64 64 6c 65 | 28 76 6f 69 64 29 0a 7b |awPaddle|(void).{|
|000061a0| 0a 09 50 6f 69 6e 74 20 | 6d 6f 75 73 65 4c 6f 63 |..Point |mouseLoc|
|000061b0| 3b 0a 09 6f 6c 64 50 61 | 64 64 6c 65 52 65 63 74 |;..oldPa|ddleRect|
|000061c0| 20 3d 20 70 61 64 64 6c | 65 52 65 63 74 3b 0a 09 | = paddl|eRect;..|
|000061d0| 0a 09 47 65 74 4d 6f 75 | 73 65 28 26 6d 6f 75 73 |..GetMou|se(&mous|
|000061e0| 65 4c 6f 63 29 3b 0a 09 | 0a 09 69 66 28 6d 6f 75 |eLoc);..|..if(mou|
|000061f0| 73 65 4c 6f 63 2e 68 20 | 3e 20 33 38 37 29 0a 09 |seLoc.h |> 387)..|
|00006200| 7b 0a 09 09 6d 6f 75 73 | 65 4c 6f 63 2e 68 20 3d |{...mous|eLoc.h =|
|00006210| 20 33 38 37 3b 0a 09 7d | 0a 09 0a 09 69 66 28 6d | 387;..}|....if(m|
|00006220| 6f 75 73 65 4c 6f 63 2e | 68 20 3c 20 31 39 29 0a |ouseLoc.|h < 19).|
|00006230| 09 7b 0a 09 09 6d 6f 75 | 73 65 4c 6f 63 2e 68 20 |.{...mou|seLoc.h |
|00006240| 3d 20 31 39 3b 0a 0a 09 | 7d 0a 09 0a 09 6d 6f 76 |= 19;...|}....mov|
|00006250| 65 6d 65 6e 74 20 3d 20 | 6d 6f 75 73 65 4c 6f 63 |ement = |mouseLoc|
|00006260| 2e 68 20 2d 20 70 61 64 | 64 6c 65 52 65 63 74 2e |.h - pad|dleRect.|
|00006270| 6c 65 66 74 3b 0a 09 69 | 66 28 6d 6f 76 65 6d 65 |left;..i|f(moveme|
|00006280| 6e 74 20 3e 20 31 35 29 | 0a 09 09 6d 6f 76 65 6d |nt > 15)|...movem|
|00006290| 65 6e 74 20 3d 20 31 35 | 3b 0a 09 69 66 28 6d 6f |ent = 15|;..if(mo|
|000062a0| 76 65 6d 65 6e 74 20 3c | 20 2d 31 35 29 0a 09 09 |vement <| -15)...|
|000062b0| 6d 6f 76 65 6d 65 6e 74 | 20 3d 20 2d 31 35 3b 0a |movement| = -15;.|
|000062c0| 09 0a 09 70 61 64 64 6c | 65 52 65 63 74 2e 6c 65 |...paddl|eRect.le|
|000062d0| 66 74 20 3d 20 6d 6f 75 | 73 65 4c 6f 63 2e 68 3b |ft = mou|seLoc.h;|
|000062e0| 0a 09 70 61 64 64 6c 65 | 52 65 63 74 2e 72 69 67 |..paddle|Rect.rig|
|000062f0| 68 74 20 3d 20 6d 6f 75 | 73 65 4c 6f 63 2e 68 20 |ht = mou|seLoc.h |
|00006300| 2b 20 39 32 3b 0a 09 0a | 09 42 6c 69 74 53 70 72 |+ 92;...|.BlitSpr|
|00006310| 69 74 65 54 6f 57 6f 72 | 6b 4d 61 70 28 34 2c 20 |iteToWor|kMap(4, |
|00006320| 26 70 61 64 64 6c 65 52 | 65 63 74 29 3b 0a 7d 0a |&paddleR|ect);.}.|
|00006330| 0a 76 6f 69 64 20 44 72 | 61 77 50 61 64 64 6c 65 |.void Dr|awPaddle|
|00006340| 43 65 6e 74 65 72 65 64 | 28 76 6f 69 64 29 0a 7b |Centered|(void).{|
|00006350| 09 0a 09 45 72 61 73 65 | 57 6f 72 6b 4d 61 70 52 |...Erase|WorkMapR|
|00006360| 65 63 74 28 26 70 61 64 | 64 6c 65 52 65 63 74 29 |ect(&pad|dleRect)|
|00006370| 3b 0a 09 0a 20 20 20 20 | 20 20 20 20 2f 2f 73 65 |;... | //se|
|00006380| 74 20 70 61 64 64 6c 65 | 20 74 6f 20 63 65 6e 74 |t paddle| to cent|
|00006390| 65 72 0a 09 70 61 64 64 | 6c 65 52 65 63 74 2e 6c |er..padd|leRect.l|
|000063a0| 65 66 74 20 3d 20 32 30 | 33 3b 0a 09 70 61 64 64 |eft = 20|3;..padd|
|000063b0| 6c 65 52 65 63 74 2e 72 | 69 67 68 74 20 3d 20 32 |leRect.r|ight = 2|
|000063c0| 30 33 20 2b 20 39 32 3b | 0a 0a 09 42 6c 69 74 53 |03 + 92;|...BlitS|
|000063d0| 70 72 69 74 65 54 6f 57 | 6f 72 6b 4d 61 70 28 34 |priteToW|orkMap(4|
|000063e0| 2c 20 26 70 61 64 64 6c | 65 52 65 63 74 29 3b 09 |, &paddl|eRect);.|
|000063f0| 0a 7d 0a 0a 0a 76 6f 69 | 64 20 44 72 61 77 42 72 |.}...voi|d DrawBr|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.