2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-12-31 03:21:33 +00:00
< meta name = "generator" content = "ZealOS V1.08" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-10-08 07:06:11 +01:00
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
2021-07-03 05:07:57 +01:00
< / style >
< / head >
< body >
2021-07-05 01:12:38 +01:00
< pre style = "font-family:monospace;font-size:12pt" >
2021-07-03 05:07:57 +01:00
< a name = "l1" > < / a > < span class = cF0 > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " Misc/TOS" < / span > < span class = cF0 >
< a name = "l2" > < / a >
< a name = "l3" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > fg_on = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l4" > < / a >
< a name = "l5" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > CopyVideo()
< a name = "l6" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l7" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > res = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l8" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > old_silent = < / span > < span class = cF5 > Silent< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l9" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l10" > < / a > < / span > < span class = cF5 > Del< / span > < span class = cF0 > (< / span > < span class = cF6 > " D:/Tmp/*.AU" < / span > < span class = cF0 > );
< a name = "l11" > < / a > < / span > < span class = cF5 > Del< / span > < span class = cF0 > (< / span > < span class = cF6 > " D:/Tmp/*.MV" < / span > < span class = cF0 > );
< a name = "l12" > < / a > < / span > < span class = cF5 > Silent< / span > < span class = cF0 > (old_silent);
< a name = "l13" > < / a > < / span > < span class = cF5 > SoundShift< / span > < span class = cF0 > (& < / span > < span class = cFB > screencast< / span > < span class = cF0 > .sound_head, < / span > < span class = cFE > 0< / span > < span class = cF0 > .< / span > < span class = cFE > 185< / span > < span class = cF0 > );
< a name = "l14" > < / a > < / span > < span class = cF5 > AUWrite< / span > < span class = cF0 > (< / span > < span class = cF6 > " D:/Tmp/AUDIO" < / span > < span class = cF0 > , & < / span > < span class = cFB > screencast< / span > < span class = cF0 > .sound_head, < / span > < span class = cFB > screencast< / span > < span class = cF0 > .t0_now, < / span > < span class = cFB > screencast< / span > < span class = cF0 > .t0_tS);
< a name = "l15" > < / a > < / span > < span class = cF5 > QueueDel< / span > < span class = cF0 > (& < / span > < span class = cFB > screencast< / span > < span class = cF0 > .sound_head, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l16" > < / a > < / span > < span class = cF5 > GR2MV< / span > < span class = cF0 > (< / span > < span class = cF6 > " D:/Tmp/VID%03d.MV" < / span > < span class = cF0 > , < / span > < span class = cF6 > " B:/Tmp" < / span > < span class = cF0 > , < / span > < span class = cF6 > " +d" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l17" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l18" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l19" > < / a > }
< a name = "l20" > < / a >
< a name = "l21" > < / a > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " ScreenCast/TOS" < / span > < span class = cF0 >
< a name = "l22" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > DelScreenShots()
< a name = "l23" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l24" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > old_silent = < / span > < span class = cF5 > Silent< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l25" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l26" > < / a > < / span > < span class = cF5 > DelTree< / span > < span class = cF0 > (< / span > < span class = cF6 > " B:/Tmp" < / span > < span class = cF0 > );
< a name = "l27" > < / a > < / span > < span class = cF5 > DirMake< / span > < span class = cF0 > (< / span > < span class = cF6 > " B:/Tmp" < / span > < span class = cF0 > );
< a name = "l28" > < / a > < / span > < span class = cF5 > Del< / span > < span class = cF0 > (< / span > < span class = cF6 > " D:/Tmp/*.AU" < / span > < span class = cF0 > );
< a name = "l29" > < / a > < / span > < span class = cF5 > Del< / span > < span class = cF0 > (< / span > < span class = cF6 > " D:/Tmp/*.MV" < / span > < span class = cF0 > );
< a name = "l30" > < / a > < / span > < span class = cF5 > Del< / span > < span class = cF0 > (< / span > < span class = cF6 > " C:/Tmp/*.AU" < / span > < span class = cF0 > );
< a name = "l31" > < / a > < / span > < span class = cF5 > Del< / span > < span class = cF0 > (< / span > < span class = cF6 > " C:/Tmp/*.MV" < / span > < span class = cF0 > );
< a name = "l32" > < / a > < / span > < span class = cF5 > Silent< / span > < span class = cF0 > (old_silent);
2021-07-03 05:07:57 +01:00
< a name = "l33" > < / a > }
< a name = "l34" > < / a >
< a name = "l35" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > FrameGrabberToggle(< / span > < span class = cF1 > Bool< / span > < span class = cF0 > sync_tone, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > tos_theme, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > just_audio=< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > )
< a name = "l36" > < / a > {< / span > < span class = cF2 > //The frame grabber saves GR files to B:/Tmp.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l37" > < / a > < / span > < span class = cF1 > static< / span > < span class = cF0 > < / span > < span class = cF1 > F64< / span > < span class = cF0 > last_time = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l38" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l39" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > tS< / span > < span class = cF0 > - last_time > < / span > < span class = cFE > 3< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l40" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l41" > < / a > last_time = < / span > < span class = cF5 > tS< / span > < span class = cF0 > ;
< a name = "l42" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (fg_on)
< a name = "l43" > < / a > {
< a name = "l44" > < / a > fg_on = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l45" > < / a > < / span > < span class = cF5 > ScreenCast< / span > < span class = cF0 > (< / span > < span class = cF3 > OFF< / span > < span class = cF0 > );
< a name = "l46" > < / a > < / span > < span class = cF5 > User< / span > < span class = cF0 > (< / span > < span class = cF6 > " CopyVideo;Exit;\n" < / span > < span class = cF0 > );
< a name = "l47" > < / a > }
< a name = "l48" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l49" > < / a > {
< a name = "l50" > < / a > DelScreenShots;
< a name = "l51" > < / a > fg_on = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l52" > < / a > < / span > < span class = cF5 > ScreenCast< / span > < span class = cF0 > (< / span > < span class = cF3 > ON< / span > < span class = cF0 > , just_audio);
< a name = "l53" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (sync_tone)
< a name = "l54" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l55" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l56" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l57" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tos_theme)
< a name = "l58" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l59" > < / a > < / span > < span class = cF5 > User< / span > < span class = cF0 > (< / span > < span class = cF6 > " ExeFile(\" ~/TOS/TOSTheme\" );Exit;\n" < / span > < span class = cF0 > );< / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l60" > < / a > }
< a name = "l61" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l62" > < / a > }
< a name = "l63" > < / a >
< a name = "l64" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > JukeSongTAD(< / span > < span class = cF9 > I64< / span > < span class = cF0 > num, < / span > < span class = cF9 > I64< / span > < span class = cF0 > passes=< / span > < span class = cFE > 2< / span > < span class = cF0 > )
< a name = "l65" > < / a > {< / span > < span class = cF2 > //Make movie of one song.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l66" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!fg_on)
< a name = "l67" > < / a > FrameGrabberToggle(< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l68" > < / a > < / span > < span class = cF5 > Sleep< / span > < span class = cF0 > (< / span > < span class = cFE > 200< / span > < span class = cF0 > );
< a name = "l69" > < / a > JukeSongsPuppet(< / span > < span class = cF6 > " ~/TAD/Songs" < / span > < span class = cF0 > , passes, num, num + < / span > < span class = cFE > 1< / span > < span class = cF0 > );
< a name = "l70" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (fg_on)
< a name = "l71" > < / a > FrameGrabberToggle(< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l72" > < / a > }
< a name = "l73" > < / a >
< a name = "l74" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > JukeSongSup(< / span > < span class = cF9 > I64< / span > < span class = cF0 > vol, < / span > < span class = cF9 > I64< / span > < span class = cF0 > num, < / span > < span class = cF9 > I64< / span > < span class = cF0 > passes=< / span > < span class = cFE > 2< / span > < span class = cF0 > )
< a name = "l75" > < / a > {< / span > < span class = cF2 > //Make movie of one song.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l76" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st = < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (< / span > < span class = cF6 > " ~/Sup%d/Sup%dHymns" < / span > < span class = cF0 > , vol, vol);
2021-07-03 05:07:57 +01:00
< a name = "l77" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l78" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!fg_on)
< a name = "l79" > < / a > FrameGrabberToggle(< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l80" > < / a > JukeSongsPuppet(st, passes, num, num + < / span > < span class = cFE > 1< / span > < span class = cF0 > );
< a name = "l81" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (fg_on)
< a name = "l82" > < / a > FrameGrabberToggle(< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l83" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st);
2021-07-03 05:07:57 +01:00
< a name = "l84" > < / a > }
< a name = "l85" > < / a >
< a name = "l86" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > JukeLines(< / span > < span class = cF9 > I64< / span > < span class = cF0 > vol, < / span > < span class = cF9 > I64< / span > < span class = cF0 > start_line, < / span > < span class = cF9 > I64< / span > < span class = cF0 > end_line)
< a name = "l87" > < / a > {< / span > < span class = cF2 > //Make movie of many lines of songs, starting at 0.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l88" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st = < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (< / span > < span class = cF6 > " ~/Sup%d/Sup%dHymns" < / span > < span class = cF0 > , vol, vol);
2021-07-03 05:07:57 +01:00
< a name = "l89" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l90" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!fg_on)
< a name = "l91" > < / a > FrameGrabberToggle(< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l92" > < / a > JukeSongsPuppet(st,, start_line * < / span > < span class = cFE > 5< / span > < span class = cF0 > , end_line * < / span > < span class = cFE > 5< / span > < span class = cF0 > );
< a name = "l93" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (fg_on)
< a name = "l94" > < / a > FrameGrabberToggle(< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l95" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st);
2021-07-03 05:07:57 +01:00
< a name = "l96" > < / a > }
< a name = "l97" > < / a >
< a name = "l98" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > TADHymns(< / span > < span class = cF9 > I64< / span > < span class = cF0 > vol, < / span > < span class = cF9 > I64< / span > < span class = cF0 > let)
< a name = "l99" > < / a > {< / span > < span class = cF2 > //Make 2-lines of songs movie< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l100" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > line = < / span > < span class = cFE > 2< / span > < span class = cF0 > * (< / span > < span class = cF5 > ToUpper< / span > < span class = cF7 > (< / span > < span class = cF0 > let< / span > < span class = cF7 > )< / span > < span class = cF0 > - < / span > < span class = cF6 > 'A'< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l101" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l102" > < / a > JukeLines(vol, line, line + < / span > < span class = cFE > 2< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l103" > < / a > }
< a name = "l104" > < / a >
< a name = "l105" > < / a > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " Misc/TOS" < / span > < span class = cF0 >
< a name = "l106" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > DiskCheckAll()
< a name = "l107" > < / a > {< / span > < span class = cF2 > //DiskCheck on C & D.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l108" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *ptr = TOS_HDS;
2021-07-03 05:07:57 +01:00
< a name = "l109" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l110" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (*ptr)
< a name = "l111" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l112" > < / a > < / span > < span class = cF6 > " DiskCheck('%c')\n" < / span > < span class = cF0 > , *ptr;
< a name = "l113" > < / a > < / span > < span class = cF5 > DiskCheck< / span > < span class = cF0 > (*ptr++, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l114" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l115" > < / a > }
< a name = "l116" > < / a >
< a name = "l117" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *DC2Doc(< / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc, < / span > < span class = cF9 > I64< / span > < span class = cF0 > dx=< / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF9 > I64< / span > < span class = cF0 > dy=< / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_total_score=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
< a name = "l118" > < / a > {< / span > < span class = cF2 > //Use OCR to make a text DolDoc from CDC.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l119" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > byte_bit_counts[< / span > < span class = cFE > 256< / span > < span class = cF0 > ];
< a name = "l120" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, j, *ptr, row, col, ch, best_ch, score, best_score,
< a name = "l121" > < / a > cur_char_image, diff_image, total_score = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l122" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc = < / span > < span class = cF5 > DocNew< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l123" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l124" > < / a > < / span > < span class = cF5 > MemSet< / span > < span class = cF0 > (byte_bit_counts, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF0 > byte_bit_counts< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l125" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFE > 256< / span > < span class = cF0 > ; i++)
< a name = "l126" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (j = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; j < < / span > < span class = cFE > 7< / span > < span class = cF0 > ; j++)
< a name = "l127" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Bt< / span > < span class = cF7 > (< / span > < span class = cF0 > & i, j< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l128" > < / a > byte_bit_counts[i]++;
2021-07-03 05:07:57 +01:00
< a name = "l129" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l130" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (row = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; row < dc-> height / < / span > < span class = cF3 > FONT_HEIGHT< / span > < span class = cF0 > ; row++)
< a name = "l131" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l132" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (col = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; col < dc-> width / < / span > < span class = cF3 > FONT_WIDTH< / span > < span class = cF0 > ; col++)
< a name = "l133" > < / a > {
2021-07-03 05:07:57 +01:00
< a name = "l134" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l135" > < / a > cur_char_image = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l136" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cF3 > FONT_HEIGHT< / span > < span class = cF0 > ; i++)
< a name = "l137" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (j = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; j < < / span > < span class = cF3 > FONT_WIDTH< / span > < span class = cF0 > ; j++)
< a name = "l138" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > GrPeek< / span > < span class = cF7 > (< / span > < span class = cF0 > dc, col * < / span > < span class = cF3 > FONT_WIDTH< / span > < span class = cF0 > + j + dx, row * < / span > < span class = cF3 > FONT_HEIGHT< / span > < span class = cF0 > + i + dy< / span > < span class = cF7 > )< / span > < span class = cF0 > != < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > )
< a name = "l139" > < / a > < / span > < span class = cF5 > LBts< / span > < span class = cF0 > (& cur_char_image, i * < / span > < span class = cFE > 8< / span > < span class = cF0 > + j);
2021-07-03 05:07:57 +01:00
< a name = "l140" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l141" > < / a > best_score = < / span > < span class = cF3 > I64_MAX< / span > < span class = cF0 > ;
< a name = "l142" > < / a > best_ch = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l143" > < / a > ptr = & < / span > < span class = cFB > text< / span > < span class = cF0 > .font[< / span > < span class = cFE > 32< / span > < span class = cF0 > ];
< a name = "l144" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (ch = < / span > < span class = cFE > 32< / span > < span class = cF0 > ; ch < < / span > < span class = cFE > 127< / span > < span class = cF0 > ; ch++)
< a name = "l145" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l146" > < / a > diff_image = *ptr++ ^ cur_char_image;
< a name = "l147" > < / a > score = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l148" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFE > 8< / span > < span class = cF0 > ; i++)
< a name = "l149" > < / a > score += byte_bit_counts[diff_image.u8[i]];
< a name = "l150" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (score < best_score)
< a name = "l151" > < / a > {
< a name = "l152" > < / a > best_score = score;
< a name = "l153" > < / a > best_ch = ch;
< a name = "l154" > < / a > }
< a name = "l155" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l156" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (best_ch == < / span > < span class = cF6 > '$'< / span > < span class = cF0 > )
< a name = "l157" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " $$" < / span > < span class = cF0 > );
< a name = "l158" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l159" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " %c" < / span > < span class = cF0 > , best_ch);
< a name = "l160" > < / a > total_score += best_score;
< a name = "l161" > < / a > }
< a name = "l162" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " \n" < / span > < span class = cF0 > );
< a name = "l163" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l164" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (_total_score)
< a name = "l165" > < / a > *_total_score = total_score;
2021-07-03 05:07:57 +01:00
< a name = "l166" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l167" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > doc;
2021-07-03 05:07:57 +01:00
< a name = "l168" > < / a > }
< a name = "l169" > < / a >
< a name = "l170" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > MEM_TEST_SIZE < / span > < span class = cFE > 1024< / span > < span class = cF0 > * < / span > < span class = cFE > 1024< / span > < span class = cF0 >
< a name = "l171" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > MemTest()
< a name = "l172" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l173" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *b;
2021-07-03 05:07:57 +01:00
< a name = "l174" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l175" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cFB > sys_data_bp< / span > < span class = cF0 > -> alloced_u8s - < / span > < span class = cFB > sys_data_bp< / span > < span class = cF0 > -> used_u8s > < / span > < span class = cFE > 0x1000000< / span > < span class = cF0 > )
< a name = "l176" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l177" > < / a > b = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (MEM_TEST_SIZE, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> data_heap);
< a name = "l178" > < / a > < / span > < span class = cF5 > MemSet< / span > < span class = cF0 > (b, < / span > < span class = cFE > 0x88< / span > < span class = cF0 > , < / span > < span class = cF5 > MSize< / span > < span class = cF7 > (< / span > < span class = cF0 > b< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l179" > < / a > < / span > < span class = cF6 > " Data:%X\n" < / span > < span class = cF0 > , < / span > < span class = cFB > sys_data_bp< / span > < span class = cF0 > -> alloced_u8s - < / span > < span class = cFB > sys_data_bp< / span > < span class = cF0 > -> used_u8s;
< a name = "l180" > < / a > < / span > < span class = cF5 > Yield< / span > < span class = cF0 > ;
< a name = "l181" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l182" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cFB > sys_code_bp< / span > < span class = cF0 > -> alloced_u8s - < / span > < span class = cFB > sys_code_bp< / span > < span class = cF0 > -> used_u8s > < / span > < span class = cFE > 0x1000000< / span > < span class = cF0 > )
< a name = "l183" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l184" > < / a > b = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (MEM_TEST_SIZE, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> code_heap);
< a name = "l185" > < / a > < / span > < span class = cF5 > MemSet< / span > < span class = cF0 > (b, < / span > < span class = cFE > 0x88< / span > < span class = cF0 > , < / span > < span class = cF5 > MSize< / span > < span class = cF7 > (< / span > < span class = cF0 > b< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l186" > < / a > < / span > < span class = cF6 > " Code:%X\n" < / span > < span class = cF0 > , < / span > < span class = cFB > sys_code_bp< / span > < span class = cF0 > -> alloced_u8s - < / span > < span class = cFB > sys_code_bp< / span > < span class = cF0 > -> used_u8s;
< a name = "l187" > < / a > < / span > < span class = cF5 > Yield< / span > < span class = cF0 > ;
< a name = "l188" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l189" > < / a > }
< / span > < / pre > < / body >
< / html >