home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 June / Chip_06_2000.iso / games / WheelofTime / WoTDemo.exe / System / Legend.u / GoalAbstracterInterf_FocusSelectorOnGreatestLOS_ScriptText.TextBuffer < prev    next >
Unknown  |  1999-11-02  |  3.0 KB

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 4a 30 2f 2f 3d 3d 3d 3d |........|J0//====|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0d 0a 2f 2f 20 46 6f |========|=..// Fo|
|00000060| 63 75 73 53 65 6c 65 63 | 74 6f 72 4f 6e 47 72 65 |cusSelec|torOnGre|
|00000070| 61 74 65 73 74 4c 4f 53 | 2e 75 63 0d 0a 2f 2f 20 |atestLOS|.uc..// |
|00000080| 24 41 75 74 68 6f 72 3a | 20 4d 66 6f 78 20 24 0d |$Author:| Mfox $.|
|00000090| 0a 2f 2f 20 24 44 61 74 | 65 3a 20 31 30 2f 32 36 |.// $Dat|e: 10/26|
|000000a0| 2f 39 39 20 35 3a 33 38 | 70 20 24 0d 0a 2f 2f 20 |/99 5:38|p $..// |
|000000b0| 24 52 65 76 69 73 69 6f | 6e 3a 20 31 20 24 0d 0a |$Revisio|n: 1 $..|
|000000c0| 2f 2f 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |//======|========|
|000000d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000100| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0d |========|=======.|
|00000110| 0a 0d 0a 63 6c 61 73 73 | 20 46 6f 63 75 73 53 65 |...class| FocusSe|
|00000120| 6c 65 63 74 6f 72 4f 6e | 47 72 65 61 74 65 73 74 |lectorOn|Greatest|
|00000130| 4c 4f 53 20 65 78 70 61 | 6e 64 73 20 46 6f 63 75 |LOS expa|nds Focu|
|00000140| 73 53 65 6c 65 63 74 6f | 72 4f 6e 41 63 74 6f 72 |sSelecto|rOnActor|
|00000150| 3b 0d 0a 0d 0a 0d 0a 0d | 0a 73 74 61 74 69 63 20 |;.......|.static |
|00000160| 66 75 6e 63 74 69 6f 6e | 20 62 6f 6f 6c 20 53 65 |function| bool Se|
|00000170| 6c 65 63 74 46 6f 63 75 | 73 28 20 47 6f 61 6c 41 |lectFocu|s( GoalA|
|00000180| 62 73 74 72 61 63 74 65 | 72 49 6e 74 65 72 66 20 |bstracte|rInterf |
|00000190| 46 6f 63 75 73 2c 0d 0a | 09 09 47 6f 61 6c 41 62 |Focus,..|..GoalAb|
|000001a0| 73 74 72 61 63 74 65 72 | 49 6e 74 65 72 66 20 53 |stracter|Interf S|
|000001b0| 65 6c 65 63 74 65 64 57 | 61 79 70 6f 69 6e 74 2c |electedW|aypoint,|
|000001c0| 0d 0a 09 09 41 63 74 6f | 72 20 46 6f 63 75 73 69 |....Acto|r Focusi|
|000001d0| 6e 67 41 63 74 6f 72 2c | 0d 0a 09 09 42 65 68 61 |ngActor,|....Beha|
|000001e0| 76 69 6f 72 43 6f 6e 73 | 74 72 61 69 6e 65 72 20 |viorCons|trainer |
|000001f0| 43 6f 6e 73 74 72 61 69 | 6e 65 72 2c 0d 0a 09 09 |Constrai|ner,....|
|00000200| 47 6f 61 6c 41 62 73 74 | 72 61 63 74 65 72 49 6e |GoalAbst|racterIn|
|00000210| 74 65 72 66 20 47 6f 61 | 6c 20 29 0d 0a 7b 0d 0a |terf Goa|l )..{..|
|00000220| 09 63 6c 61 73 73 27 44 | 65 62 75 67 27 2e 73 74 |.class'D|ebug'.st|
|00000230| 61 74 69 63 2e 44 65 62 | 75 67 4c 6f 67 28 20 46 |atic.Deb|ugLog( F|
|00000240| 6f 63 75 73 69 6e 67 41 | 63 74 6f 72 2c 20 22 53 |ocusingA|ctor, "S|
|00000250| 65 6c 65 63 74 46 6f 63 | 75 73 22 2c 20 64 65 66 |electFoc|us", def|
|00000260| 61 75 6c 74 2e 44 65 62 | 75 67 43 61 74 65 67 6f |ault.Deb|ugCatego|
|00000270| 72 79 4e 61 6d 65 20 29 | 3b 0d 0a 09 53 65 6c 65 |ryName )|;...Sele|
|00000280| 63 74 46 6f 63 75 73 4f | 6e 47 72 65 61 74 65 73 |ctFocusO|nGreates|
|00000290| 74 4c 69 6e 65 4f 66 53 | 69 67 68 74 28 20 46 6f |tLineOfS|ight( Fo|
|000002a0| 63 75 73 2c 20 53 65 6c | 65 63 74 65 64 57 61 79 |cus, Sel|ectedWay|
|000002b0| 70 6f 69 6e 74 2c 20 46 | 6f 63 75 73 69 6e 67 41 |point, F|ocusingA|
|000002c0| 63 74 6f 72 2c 0d 0a 09 | 09 09 43 6f 6e 73 74 72 |ctor,...|..Constr|
|000002d0| 61 69 6e 65 72 2c 20 47 | 6f 61 6c 20 29 3b 0d 0a |ainer, G|oal );..|
|000002e0| 09 72 65 74 75 72 6e 20 | 74 72 75 65 3b 0d 0a 7d |.return |true;..}|
|000002f0| 0d 0a 0d 0a 0d 0a 0d 0a | 2f 2f 61 74 74 65 6d 70 |........|//attemp|
|00000300| 74 20 74 6f 20 69 6e 69 | 74 69 61 6c 69 7a 65 20 |t to ini|tialize |
|00000310| 74 68 65 20 66 6f 63 75 | 73 20 66 72 6f 6d 20 74 |the focu|s from t|
|00000320| 68 65 20 67 6f 61 6c 20 | 69 66 20 6e 6f 74 20 70 |he goal |if not p|
|00000330| 6f 73 73 69 62 6c 65 0d | 0a 2f 2f 69 6e 69 74 69 |ossible.|.//initi|
|00000340| 61 6c 69 7a 65 20 74 68 | 65 20 66 6f 63 75 73 20 |alize th|e focus |
|00000350| 66 72 6f 6d 20 74 68 65 | 20 6d 6f 76 69 6e 67 20 |from the| moving |
|00000360| 61 63 74 6f 72 0d 0a 73 | 74 61 74 69 63 20 66 75 |actor..s|tatic fu|
|00000370| 6e 63 74 69 6f 6e 20 53 | 65 6c 65 63 74 46 6f 63 |nction S|electFoc|
|00000380| 75 73 4f 6e 47 72 65 61 | 74 65 73 74 4c 69 6e 65 |usOnGrea|testLine|
|00000390| 4f 66 53 69 67 68 74 28 | 20 47 6f 61 6c 41 62 73 |OfSight(| GoalAbs|
|000003a0| 74 72 61 63 74 65 72 49 | 6e 74 65 72 66 20 46 6f |tracterI|nterf Fo|
|000003b0| 63 75 73 2c 0d 0a 09 09 | 47 6f 61 6c 41 62 73 74 |cus,....|GoalAbst|
|000003c0| 72 61 63 74 65 72 49 6e | 74 65 72 66 20 53 65 6c |racterIn|terf Sel|
|000003d0| 65 63 74 65 64 57 61 79 | 70 6f 69 6e 74 2c 0d 0a |ectedWay|point,..|
|000003e0| 09 09 41 63 74 6f 72 20 | 46 6f 63 75 73 69 6e 67 |..Actor |Focusing|
|000003f0| 41 63 74 6f 72 2c 0d 0a | 09 09 42 65 68 61 76 69 |Actor,..|..Behavi|
|00000400| 6f 72 43 6f 6e 73 74 72 | 61 69 6e 65 72 20 43 6f |orConstr|ainer Co|
|00000410| 6e 73 74 72 61 69 6e 65 | 72 2c 0d 0a 09 09 47 6f |nstraine|r,....Go|
|00000420| 61 6c 41 62 73 74 72 61 | 63 74 65 72 49 6e 74 65 |alAbstra|cterInte|
|00000430| 72 66 20 47 6f 61 6c 20 | 29 0d 0a 7b 0d 0a 09 6c |rf Goal |)..{...l|
|00000440| 6f 63 61 6c 20 56 65 63 | 74 6f 72 20 46 6f 63 75 |ocal Vec|tor Focu|
|00000450| 73 4c 6f 63 61 74 69 6f | 6e 3b 0d 0a 09 6c 6f 63 |sLocatio|n;...loc|
|00000460| 61 6c 20 52 6f 74 61 74 | 6f 72 20 46 6f 63 75 73 |al Rotat|or Focus|
|00000470| 52 6f 74 61 74 69 6f 6e | 3b 0d 0a 0d 0a 09 63 6c |Rotation|;.....cl|
|00000480| 61 73 73 27 44 65 62 75 | 67 27 2e 73 74 61 74 69 |ass'Debu|g'.stati|
|00000490| 63 2e 44 65 62 75 67 4c | 6f 67 28 20 46 6f 63 75 |c.DebugL|og( Focu|
|000004a0| 73 69 6e 67 41 63 74 6f | 72 2c 20 22 53 65 6c 65 |singActo|r, "Sele|
|000004b0| 63 74 46 6f 63 75 73 4f | 6e 47 72 65 61 74 65 73 |ctFocusO|nGreates|
|000004c0| 74 4c 69 6e 65 4f 66 53 | 69 67 68 74 22 2c 20 64 |tLineOfS|ight", d|
|000004d0| 65 66 61 75 6c 74 2e 44 | 65 62 75 67 43 61 74 65 |efault.D|ebugCate|
|000004e0| 67 6f 72 79 4e 61 6d 65 | 20 29 3b 0d 0a 09 46 6f |goryName| );...Fo|
|000004f0| 63 75 73 4c 6f 63 61 74 | 69 6f 6e 20 3d 20 47 65 |cusLocat|ion = Ge|
|00000500| 74 46 6f 63 75 73 4c 6f | 63 61 74 69 6f 6e 57 69 |tFocusLo|cationWi|
|00000510| 74 68 47 72 65 61 74 65 | 73 74 4c 69 6e 65 4f 66 |thGreate|stLineOf|
|00000520| 53 69 67 68 74 28 20 46 | 6f 63 75 73 69 6e 67 41 |Sight( F|ocusingA|
|00000530| 63 74 6f 72 20 29 3b 0d | 0a 09 43 6f 6e 73 74 72 |ctor );.|..Constr|
|00000540| 61 69 6e 65 72 2e 43 6f | 6e 73 74 72 61 69 6e 41 |ainer.Co|nstrainA|
|00000550| 63 74 6f 72 46 6f 63 75 | 73 41 6e 64 52 6f 74 61 |ctorFocu|sAndRota|
|00000560| 74 69 6f 6e 28 20 46 6f | 63 75 73 4c 6f 63 61 74 |tion( Fo|cusLocat|
|00000570| 69 6f 6e 2c 20 46 6f 63 | 75 73 52 6f 74 61 74 69 |ion, Foc|usRotati|
|00000580| 6f 6e 2c 0d 0a 09 09 09 | 46 6f 63 75 73 4c 6f 63 |on,.....|FocusLoc|
|00000590| 61 74 69 6f 6e 2c 20 46 | 6f 63 75 73 69 6e 67 41 |ation, F|ocusingA|
|000005a0| 63 74 6f 72 20 29 3b 0d | 0a 09 46 6f 63 75 73 2e |ctor );.|..Focus.|
|000005b0| 41 73 73 69 67 6e 56 65 | 63 74 6f 72 28 20 46 6f |AssignVe|ctor( Fo|
|000005c0| 63 75 73 69 6e 67 41 63 | 74 6f 72 2c 20 46 6f 63 |cusingAc|tor, Foc|
|000005d0| 75 73 4c 6f 63 61 74 69 | 6f 6e 2c 20 66 61 6c 73 |usLocati|on, fals|
|000005e0| 65 20 29 3b 0d 0a 09 46 | 6f 63 75 73 2e 53 65 74 |e );...F|ocus.Set|
|000005f0| 41 73 73 6f 63 69 61 74 | 65 64 52 6f 74 61 74 69 |Associat|edRotati|
|00000600| 6f 6e 28 20 46 6f 63 75 | 73 69 6e 67 41 63 74 6f |on( Focu|singActo|
|00000610| 72 2c 20 46 6f 63 75 73 | 52 6f 74 61 74 69 6f 6e |r, Focus|Rotation|
|00000620| 20 29 3b 0d 0a 7d 0d 0a | 0d 0a 0d 0a 0d 0a 73 74 | );..}..|......st|
|00000630| 61 74 69 63 20 66 69 6e | 61 6c 20 66 75 6e 63 74 |atic fin|al funct|
|00000640| 69 6f 6e 20 76 65 63 74 | 6f 72 20 47 65 74 46 6f |ion vect|or GetFo|
|00000650| 63 75 73 4c 6f 63 61 74 | 69 6f 6e 57 69 74 68 47 |cusLocat|ionWithG|
|00000660| 72 65 61 74 65 73 74 4c | 69 6e 65 4f 66 53 69 67 |reatestL|ineOfSig|
|00000670| 68 74 28 20 41 63 74 6f | 72 20 46 6f 63 75 73 69 |ht( Acto|r Focusi|
|00000680| 6e 67 41 63 74 6f 72 20 | 29 0d 0a 7b 0d 0a 20 20 |ngActor |)..{.. |
|00000690| 20 20 6c 6f 63 61 6c 20 | 66 6c 6f 61 74 20 42 65 | local |float Be|
|000006a0| 73 74 44 69 73 74 2c 20 | 43 75 72 44 69 73 74 2c |stDist, |CurDist,|
|000006b0| 20 43 75 72 41 6e 67 6c | 65 49 6e 52 61 64 73 3b | CurAngl|eInRads;|
|000006c0| 0d 0a 20 20 20 20 6c 6f | 63 61 6c 20 69 6e 74 20 |.. lo|cal int |
|000006d0| 42 65 73 74 49 64 78 2c | 20 43 75 72 49 64 78 3b |BestIdx,| CurIdx;|
|000006e0| 0d 0a 20 20 20 20 6c 6f | 63 61 6c 20 66 6c 6f 61 |.. lo|cal floa|
|000006f0| 74 20 44 69 73 74 61 6e | 63 65 73 5b 20 38 20 5d |t Distan|ces[ 8 ]|
|00000700| 3b 0d 0a 20 20 20 20 6c | 6f 63 61 6c 20 76 65 63 |;.. l|ocal vec|
|00000710| 74 6f 72 20 4c 6f 63 61 | 74 69 6f 6e 73 5b 20 38 |tor Loca|tions[ 8|
|00000720| 20 5d 3b 0d 0a 20 20 20 | 20 6c 6f 63 61 6c 20 76 | ];.. | local v|
|00000730| 65 63 74 6f 72 20 54 72 | 61 63 65 48 69 74 4e 6f |ector Tr|aceHitNo|
|00000740| 72 6d 61 6c 2c 20 54 72 | 61 63 65 48 69 74 4c 6f |rmal, Tr|aceHitLo|
|00000750| 63 61 74 69 6f 6e 3b 0d | 0a 0d 0a 20 20 20 20 2f |cation;.|... /|
|00000760| 2f 46 69 6e 64 20 74 72 | 61 63 65 20 65 6e 64 20 |/Find tr|ace end |
|00000770| 70 6f 69 6e 74 73 20 69 | 6e 20 66 6f 75 72 20 63 |points i|n four c|
|00000780| 61 72 64 69 6e 61 6c 20 | 64 69 72 65 63 74 69 6f |ardinal |directio|
|00000790| 6e 73 20 70 6c 75 73 20 | 64 69 61 67 6f 6e 61 6c |ns plus |diagonal|
|000007a0| 73 0d 0a 20 20 20 20 43 | 75 72 41 6e 67 6c 65 49 |s.. C|urAngleI|
|000007b0| 6e 52 61 64 73 20 3d 20 | 30 2e 30 3b 0d 0a 20 20 |nRads = |0.0;.. |
|000007c0| 20 20 66 6f 72 28 20 43 | 75 72 49 64 78 20 3d 20 | for( C|urIdx = |
|000007d0| 30 3b 20 43 75 72 49 64 | 78 20 3c 20 41 72 72 61 |0; CurId|x < Arra|
|000007e0| 79 43 6f 75 6e 74 28 20 | 4c 6f 63 61 74 69 6f 6e |yCount( |Location|
|000007f0| 73 20 29 3b 20 2b 2b 43 | 75 72 49 64 78 20 29 0d |s ); ++C|urIdx ).|
|00000800| 0a 20 20 20 20 7b 0d 0a | 20 20 20 20 20 20 20 20 |. {..| |
|00000810| 4c 6f 63 61 74 69 6f 6e | 73 5b 20 43 75 72 49 64 |Location|s[ CurId|
|00000820| 78 20 5d 2e 58 20 3d 20 | 28 20 73 69 6e 28 20 43 |x ].X = |( sin( C|
|00000830| 75 72 41 6e 67 6c 65 49 | 6e 52 61 64 73 20 29 20 |urAngleI|nRads ) |
|00000840| 2a 20 31 36 30 30 30 2e | 30 20 29 3b 0d 0a 20 20 |* 16000.|0 );.. |
|00000850| 20 20 20 20 20 20 4c 6f | 63 61 74 69 6f 6e 73 5b | Lo|cations[|
|00000860| 20 43 75 72 49 64 78 20 | 5d 2e 59 20 3d 20 28 20 | CurIdx |].Y = ( |
|00000870| 63 6f 73 28 20 43 75 72 | 41 6e 67 6c 65 49 6e 52 |cos( Cur|AngleInR|
|00000880| 61 64 73 20 29 20 2a 20 | 31 36 30 30 30 2e 30 20 |ads ) * |16000.0 |
|00000890| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 4c 6f 63 61 |);.. | Loca|
|000008a0| 74 69 6f 6e 73 5b 20 43 | 75 72 49 64 78 20 5d 2e |tions[ C|urIdx ].|
|000008b0| 5a 20 3d 20 30 2e 30 3b | 0d 0a 20 20 20 20 20 20 |Z = 0.0;|.. |
|000008c0| 20 20 4c 6f 63 61 74 69 | 6f 6e 73 5b 20 43 75 72 | Locati|ons[ Cur|
|000008d0| 49 64 78 20 5d 20 2b 3d | 20 46 6f 63 75 73 69 6e |Idx ] +=| Focusin|
|000008e0| 67 41 63 74 6f 72 2e 4c | 6f 63 61 74 69 6f 6e 3b |gActor.L|ocation;|
|000008f0| 0d 0a 20 20 20 20 20 20 | 20 20 43 75 72 41 6e 67 |.. | CurAng|
|00000900| 6c 65 49 6e 52 61 64 73 | 20 2b 3d 20 28 20 32 20 |leInRads| += ( 2 |
|00000910| 2a 20 70 69 20 29 20 2f | 20 38 3b 0d 0a 20 20 20 |* pi ) /| 8;.. |
|00000920| 20 20 20 20 20 46 6f 63 | 75 73 69 6e 67 41 63 74 | Foc|usingAct|
|00000930| 6f 72 2e 54 72 61 63 65 | 28 20 54 72 61 63 65 48 |or.Trace|( TraceH|
|00000940| 69 74 4c 6f 63 61 74 69 | 6f 6e 2c 20 54 72 61 63 |itLocati|on, Trac|
|00000950| 65 48 69 74 4e 6f 72 6d | 61 6c 2c 20 4c 6f 63 61 |eHitNorm|al, Loca|
|00000960| 74 69 6f 6e 73 5b 20 43 | 75 72 49 64 78 20 5d 20 |tions[ C|urIdx ] |
|00000970| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 44 69 73 74 |);.. | Dist|
|00000980| 61 6e 63 65 73 5b 20 43 | 75 72 49 64 78 20 5d 20 |ances[ C|urIdx ] |
|00000990| 3d 20 56 53 69 7a 65 28 | 20 46 6f 63 75 73 69 6e |= VSize(| Focusin|
|000009a0| 67 41 63 74 6f 72 2e 4c | 6f 63 61 74 69 6f 6e 20 |gActor.L|ocation |
|000009b0| 2d 20 54 72 61 63 65 48 | 69 74 4c 6f 63 61 74 69 |- TraceH|itLocati|
|000009c0| 6f 6e 20 29 3b 0d 0a 20 | 20 20 20 7d 0d 0a 20 20 |on );.. | }.. |
|000009d0| 20 20 20 20 20 20 0d 0a | 20 20 20 20 2f 2f 20 6e | ..| // n|
|000009e0| 6f 77 20 73 65 6c 65 63 | 74 20 74 68 65 20 65 6e |ow selec|t the en|
|000009f0| 64 69 6e 67 20 74 72 61 | 63 65 20 70 6f 69 6e 74 |ding tra|ce point|
|00000a00| 20 77 69 74 68 20 74 68 | 65 20 67 72 65 61 74 65 | with th|e greate|
|00000a10| 73 74 20 75 6e 6f 62 73 | 74 72 75 63 74 65 64 20 |st unobs|tructed |
|00000a20| 64 69 73 74 61 6e 63 65 | 0d 0a 20 20 20 20 42 65 |distance|.. Be|
|00000a30| 73 74 44 69 73 74 20 3d | 20 30 2e 30 3b 0d 0a 20 |stDist =| 0.0;.. |
|00000a40| 20 20 20 66 6f 72 28 20 | 43 75 72 49 64 78 20 3d | for( |CurIdx =|
|00000a50| 20 30 3b 20 43 75 72 49 | 64 78 20 3c 20 41 72 72 | 0; CurI|dx < Arr|
|00000a60| 61 79 43 6f 75 6e 74 28 | 20 4c 6f 63 61 74 69 6f |ayCount(| Locatio|
|00000a70| 6e 73 20 29 3b 20 2b 2b | 43 75 72 49 64 78 20 29 |ns ); ++|CurIdx )|
|00000a80| 0d 0a 20 20 20 20 7b 0d | 0a 20 20 20 20 20 20 20 |.. {.|. |
|00000a90| 20 2f 2f 20 54 6f 74 61 | 6c 20 64 69 73 74 61 6e | // Tota|l distan|
|00000aa0| 63 65 20 69 6e 20 63 75 | 72 72 65 6e 74 20 64 69 |ce in cu|rrent di|
|00000ab0| 72 65 63 74 69 6f 6e 2c | 20 34 35 6f 20 6c 65 66 |rection,| 45o lef|
|00000ac0| 74 20 61 6e 64 20 34 35 | 6f 20 72 69 67 68 74 2e |t and 45|o right.|
|00000ad0| 0d 0a 20 20 20 20 20 20 | 20 20 43 75 72 44 69 73 |.. | CurDis|
|00000ae0| 74 20 3d 20 44 69 73 74 | 61 6e 63 65 73 5b 20 43 |t = Dist|ances[ C|
|00000af0| 75 72 49 64 78 20 5d 20 | 2b 20 44 69 73 74 61 6e |urIdx ] |+ Distan|
|00000b00| 63 65 73 5b 20 28 20 43 | 75 72 49 64 78 20 2b 20 |ces[ ( C|urIdx + |
|00000b10| 31 20 29 20 25 20 41 72 | 72 61 79 43 6f 75 6e 74 |1 ) % Ar|rayCount|
|00000b20| 28 20 44 69 73 74 61 6e | 63 65 73 20 29 20 5d 20 |( Distan|ces ) ] |
|00000b30| 2b 0d 0a 20 20 20 20 20 | 20 20 20 09 09 44 69 73 |+.. | ..Dis|
|00000b40| 74 61 6e 63 65 73 5b 20 | 28 20 43 75 72 49 64 78 |tances[ |( CurIdx|
|00000b50| 20 2b 20 41 72 72 61 79 | 43 6f 75 6e 74 28 20 44 | + Array|Count( D|
|00000b60| 69 73 74 61 6e 63 65 73 | 20 29 20 2d 20 31 20 29 |istances| ) - 1 )|
|00000b70| 20 25 20 41 72 72 61 79 | 43 6f 75 6e 74 28 20 44 | % Array|Count( D|
|00000b80| 69 73 74 61 6e 63 65 73 | 20 29 20 5d 3b 0d 0a 20 |istances| ) ];.. |
|00000b90| 20 20 20 20 20 20 20 69 | 66 28 20 43 75 72 44 69 | i|f( CurDi|
|00000ba0| 73 74 20 3e 20 42 65 73 | 74 44 69 73 74 20 29 0d |st > Bes|tDist ).|
|00000bb0| 0a 20 20 20 20 20 20 20 | 20 7b 0d 0a 20 20 20 20 |. | {.. |
|00000bc0| 20 20 20 20 20 20 20 20 | 42 65 73 74 44 69 73 74 | |BestDist|
|00000bd0| 20 3d 20 43 75 72 44 69 | 73 74 3b 0d 0a 20 20 20 | = CurDi|st;.. |
|00000be0| 20 20 20 20 20 20 20 20 | 20 42 65 73 74 49 64 78 | | BestIdx|
|00000bf0| 20 3d 20 43 75 72 49 64 | 78 3b 0d 0a 20 20 20 20 | = CurId|x;.. |
|00000c00| 20 20 20 20 7d 0d 0a 20 | 20 20 20 7d 0d 0a 7d 0d | }.. | }..}.|
|00000c10| 0a 0d 0a 00 | |.... | |
+--------+-------------------------+-------------------------+--------+--------+