TempleOSCD_150216.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:15 +02:00
1 parent 64f679eeb9
commit 401601816c
531 files changed
+23341 -22071

No files matched your search

-8
View File
@@ -1,8 +0,0 @@
#include "/Accts/Adam3bPkgs"
#include "/Apps/Psalmody/Load"
Cd("HOME");;
#include "/Accts/TS/TSAdam"
#include "/Accts/TS/TSSortHeader"
#include "/Accts/TS/TSDistro"
#include "/Accts/TS/TSHolySpirit"
Cd("HOME");;
@@ -1,13 +1,38 @@
//Change anything you want in this
//acct file or others.
//Place this file in /Home and change
//anything you want.
U0 FillInTime()
U0 InsTime()
{
CDate cdt;
cdt=Now;
"$$IV,1$$----%D %T----$$IV,0$$\n",cdt,cdt;
}
U0 InsFileLink()
{
U8 *st=PopUpPickFile;
st[0]=':'; //This is my personal code, not production. LOL
"$$LK,\"%s\",A=\"FI:%s\"$$",st+2,st;
Free(st);
}
U0 InsDirLinks()
{
CDirEntry *tempde,*tempde1;
U8 *st=PopUpPickDir,*st2;
st[0]=':'; //This is my personal code, not production. LOL
st2=MStrPrint("%s/*",st);
tempde=tempde1=FilesFind(st2,FUF_JUST_FILES|FUF_JUST_TXT);
while (tempde) {
tempde->full_name[0]=':';
"$$LK,\"%s\",A=\"FI:%s\"$$\n",tempde->full_name+2,tempde->full_name;
tempde=tempde->next;
}
DirTreeDel(tempde1);
Free(st);
Free(st2);
}
Bool MyPutKey(I64 ch,I64 sc)
{//ch=ASCII; sc=scan_code
@@ -32,9 +57,9 @@ Bool MyPutKey(I64 ch,I64 sc)
case SC_F1:
if (sc&SCF_KEY_DESC) {
if (sc & SCF_SHIFT)
SetKeyDesc("Dollar/LTPURPLE");
KeyDescSet("Dollar/LTPURPLE");
else
SetKeyDesc("Dollar/PURPLE");
KeyDescSet("Dollar/PURPLE");
} else {
if (sc & SCF_SHIFT)
"$$LTPURPLE$$";
@@ -45,9 +70,9 @@ Bool MyPutKey(I64 ch,I64 sc)
case SC_F2:
if (sc&SCF_KEY_DESC) {
if (sc & SCF_SHIFT)
SetKeyDesc("Dollar/LTRED");
KeyDescSet("Dollar/LTRED");
else
SetKeyDesc("Dollar/RED");
KeyDescSet("Dollar/RED");
} else {
if (sc & SCF_SHIFT)
"$$LTRED$$";
@@ -58,9 +83,9 @@ Bool MyPutKey(I64 ch,I64 sc)
case SC_F3:
if (sc&SCF_KEY_DESC) {
if (sc & SCF_SHIFT)
SetKeyDesc("Dollar/LTGREEN");
KeyDescSet("Dollar/LTGREEN");
else
SetKeyDesc("Dollar/GREEN");
KeyDescSet("Dollar/GREEN");
} else {
if (sc & SCF_SHIFT)
"$$LTGREEN$$";
@@ -71,39 +96,52 @@ Bool MyPutKey(I64 ch,I64 sc)
case SC_F4:
if (sc&SCF_KEY_DESC) {
if (sc & SCF_SHIFT)
SetKeyDesc("Dollar/LTBLUE");
KeyDescSet("Dollar/Default Color");
else
SetKeyDesc("Dollar/Default Color");
KeyDescSet("Dollar/BLUE");
} else {
if (sc & SCF_SHIFT)
"$$LTBLUE$$";
else
"$$FG$$";
else
"$$BLUE$$";
}
break;
case SC_F6:
if (sc&SCF_KEY_DESC) {
if (sc & SCF_SHIFT)
SetKeyDesc("Misc/Insert My URL");
KeyDescSet("Misc/Ins My URL");
else
SetKeyDesc("Misc/Insert Datetime");
KeyDescSet("Misc/Ins Datetime");
} else {
if (sc & SCF_SHIFT)
FillInMyURL;
InsMyURL;
else
FillInTime;
InsTime;
}
break;
case SC_F7:
if (sc&SCF_KEY_DESC) {
if (sc & SCF_SHIFT)
SetKeyDesc("God Book Passage");
KeyDescSet("God Book Passage");
} else {
//$LK,"::/Adam/God/HSNotes.TXT"$
FifoU8Flush(god.fifo);
GodBitsIns(GOD_GOOD_BITS,KbdMouseEvtTime>>GOD_BAD_BITS);
if (sc & SCF_SHIFT)
GodBooksPassage("HOME/Archive/Text/*");
GodBooksPassage("C:/Home/Wb2/Files/Text/*");
}
break;
case SC_F8:
if (sc&SCF_KEY_DESC) {
if (sc & SCF_SHIFT)
KeyDescSet("Misc/Ins Dir Links");
else
KeyDescSet("Misc/Ins File Link");
} else {
if (sc & SCF_SHIFT)
InsDirLinks;
else
InsFileLink;
}
break;
}
@@ -112,15 +150,28 @@ Bool MyPutKey(I64 ch,I64 sc)
if (!(sc & SCF_CTRL)) {
if (sc & SCF_ALT) {
switch (ch) {
case 'a':
if (sc&SCF_KEY_DESC)
KeyDescSet("Win/AutoComplete(ON);");
else
AutoComplete(ON);
return TRUE;
case 'A':
if (sc&SCF_KEY_DESC)
KeyDescSet("Win/AutoComplete;");
else
AutoComplete;
return TRUE;
case 'h':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Win/Tile Horizontally");
KeyDescSet("Win/Tile Horizontally");
else
WinTileHorz;
return TRUE;
case 'm':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Win/Maximize");
KeyDescSet("Win/Maximize");
else {
WinMax;
WinBorder;
@@ -128,23 +179,23 @@ Bool MyPutKey(I64 ch,I64 sc)
return TRUE;
case 'v':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Win/Tile Vertically");
KeyDescSet("Win/Tile Vertically");
else
WinTileVert;
return TRUE;
case 'V':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Sys/Frame Grabber Toggle");
KeyDescSet("Sys/Frame Grabber Toggle");
else
FrameGrabberToggle;
return TRUE;
case 'l':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Edit/Put Link to Cur Pos on Clipboard");
KeyDescSet("Edit/Put Link to Cur Pos on Clipboard");
else {
ClipboardDel;
st1=FileNameAbs(Define("ST_BIBLE_FILE"));
st1=FileNameAbs(BIBLE_FILENAME);
st2=FileNameAbs(DocPut->filename.name);
if (!StrCmp(st1,st2)) {
Free(st1);
@@ -159,7 +210,7 @@ Bool MyPutKey(I64 ch,I64 sc)
return TRUE;
case 'L':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Edit/Place Anchor, Put Link to Clipboard");
KeyDescSet("Edit/Place Anchor, Put Link to Clipboard");
else {
i=RandU32;
ClipboardDel;
@@ -169,43 +220,30 @@ Bool MyPutKey(I64 ch,I64 sc)
}
return TRUE;
case 'w':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Win/WordStat(ON);");
else
WordStat(ON);
return TRUE;
case 'W':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Win/WordStat;");
else
WordStat;
return TRUE;
//Ins your own ALT-key plug-ins
case 'b':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Cmd/Jump to Bad Code");
KeyDescSet("Cmd/Jump to Bad Code");
else //$LK,"::/Adam/God/HSNotes.TXT"$
BadCodeJump;
return TRUE;
case 'g':
if (sc&SCF_KEY_DESC)
SetKeyDesc("BlogScreenShot");
KeyDescSet("BlogScreenShot");
else
BlogScreenShot;
return TRUE;
case 'p':
if (sc&SCF_KEY_DESC)
SetKeyDesc("JukeBox(TAD)");
KeyDescSet("JukeBox(TAD)");
else
JukeBox("::/Accts/TS/TAD/Psalmody");
JukeBox("::/Home/Psalmody");
return TRUE;
case 'P':
if (sc&SCF_KEY_DESC)
SetKeyDesc("JukeBox(Examples)");
KeyDescSet("JukeBox(Examples)");
else
JukeBox("::/Apps/Psalmody/Examples");
return TRUE;
+20
View File
@@ -0,0 +1,20 @@
//Place this file in /Home and change
//anything you want.
OptOn(OPTf_WARN_PAREN);
OptOn(OPTf_WARN_DUP_TYPES);
KbdTypeMatic(0);
// Las Vegas is -7 during summer, -8 during winter
local_time_offset=-8*60*60*CDATE_FREQ; //Pacific
//$AN,"",A="mouse_move_scale"$adjust these to set mouse move scale
mouse.scale.x=0.5;
mouse.scale.y=0.5;
mouse.scale.z=5.0; //wheel
//don't change these
mouse.prescale.x=mouse.pos.x/mouse.scale.x;
mouse.prescale.y=mouse.pos.y/mouse.scale.y;
mouse.prescale.z=mouse.pos.z/mouse.scale.z;
+13
View File
@@ -0,0 +1,13 @@
//Place this file in /Home and change
//anything you want.
#include "::/AdamPkgs"
#include "::/Apps/Psalmody/Load"
#include "::/Demo/WebLogExample/WebLogRep"
Cd("::/Home");;
#include "::/Home/TOSIDComputer"
#include "::/Home/TOSCfg"
#include "::/Home/TOSMisc"
#include "::/Home/TOSDistro"
#include "::/Home/TOSHolySpirit"
Cd("::/Home");;
@@ -1,3 +1,6 @@
//Place this file in /Home and change
//anything you want.
U0 UserStartUp()
{//Run each time a user a spawned
DocTermNew;
@@ -7,18 +10,12 @@ U0 UserStartUp()
WinZBufUpdate;
Preempt(ON);
Dir;
switch (ts_cid) {
case CID_TAD8:
"$$GREEN$$TAD8$$FG$$:";
break;
case CID_TAD8_VM:
"$$RED$$TAD8_VM$$FG$$:";
break;
switch (tos_cid) {
case CID_DFT:
"$$PURPLE$$DFT$$FG$$:";
break;
}
"$TX,"81,527",D="DD_TEMPLEOS_LOC_OFFICIAL"$LOC:";
"$TX,"79,905",D="DD_TEMPLEOS_LOC_OFFICIAL"$LOC:";
CPURep;
}
@@ -35,19 +32,16 @@ CTask *user1,*user2;
U0 StartUpTasks()
{
user1=SpawnUser;
user2=SpawnUser;
user1=User;
user2=User;
WinToTop(user1);
WinTileVert;
PopUp("#include \"::/Adam/Start\";");
"Boot Time:%7.3fs\n",tS;
XTalk(user1,"Cd(\"HOME\");#include \"DoOnce\";\n");
Silent(ON);
WSInit("/*;~*Bible.TXT*");
XTalk(user1,"Cd(\"::/Home\");#include \"DoOnce\";\n");
Silent;
ACInit("/*;~*Bible.TXT*;~*.TXT*"); //No Bible, no uncompressed TXT.
Silent(OFF);
"WordStat Time:%7.3fs\n",tS;
if (ts_has_win_drv)
DrvEnable(TS_WIN_DRV_LET,OFF);
"AutoComplete Time:%7.3fs\n",tS;
}
DelTree("::/Temp/ScreenShots");
-51
View File
@@ -1,51 +0,0 @@
#exe {OptOn(OPTf_WARN_PAREN);};
#exe {OptOn(OPTf_WARN_DUP_TYPES);};
HashTablePurge(adam_task->hash_table);
#help_index "Misc"
F64 os_version=2.11;//Operating system version.
#include "AdamExts.HPP"
#include "Math2a"
#include "Training"
#include "Utils2a"
#include "MathODE"
Dbg("Type 'G;'");
Cd("::/Adam/Gr");;
#include "Gr"
Cd("::/Adam/Snd");;
#include "Snd"
Cd("::/Adam/Dsk");;
#include "Dsk2"
Cd("::/Adam");;
#include "Menu"
#include "Win2a"
#include "Win2b"
#include "Dbg2a"
Cd("::/Adam/DolDoc");;
#include "Doc"
LBts(&sys_run_level,RLf_DOC);
Cd("::/Adam/Ctrls");;
#include "Ctrls"
Cd("::/Adam");;
#include "AutoFile2a"
#include "LogIn"
Cd("::/Adam/WordStat");;
#include "WordStat"
Cd("::/Adam");;
#include "Hash2a"
#include "TaskSettings"
#include "DevInfo"
#include "DocDefines"
+14 -7
View File
@@ -1,12 +1,19 @@
//Place this file in /Home and change
//anything you want.
//This file is executed by the
//first terminal window upon start-up.
//See $LK,"DoOnce",A="FF:HOME/Adam3eSys.CPP,DoOnce"$ and $LK,"Acct Files",A="FF:::/Doc/GuideLines.TXT,ACCT FILES"$.
//See $LK,"DoOnce",A="FF:/Home/AdamSys.CPP,DoOnce"$ and $LK,"Home Files",A="FF:::/Doc/GuideLines.TXT,/Home Files"$.
//It goes in your HOME directory and
//you can customize it.
// Type("::/Doc/Customize.TXT");
//Delete this to get rid of
//default start-up msg.
//Type("::/Doc/Customize.TXT");
U0 DoOnce()
{
if (FileFind("D:/Temp/Logs/access.log")) {
Auto("\n\n%C",CH_ESC);
WebLogRep("D:/Temp/Logs/*.log","D:/Temp/LogRep.TXT");
Del("D:/Temp/Logs/*.log");
}
}
DoOnce;
Binary file not shown.
+403
View File
@@ -0,0 +1,403 @@
$WW,1$* Clean-up $LK,"FileNameAbs",A="MN:FileNameAbs"$().
* Get rid of having two terms and pick one, "Disk" and "BlkDev"? I don't think so. (Probably not.)
* God said this is bad. $LK,"FL:::/Adam/DolDoc/DocFind.CPP,41"$
* $LK,"ChkDsk",A="MN:ChkDsk"$ alloc unalloced.
* Entering a '$$' in text entry
* Clean-up ASCII-127 delete.
* $LK,"StrPrintJoin",A="MN:StrPrintJoin"$(st); With st="\n\\";
* 1/1/2015 Bug messing-up keyboard, like no CTRL key. Was working on Sprites.
* 1/?/2015 Macro select in Menu did not go to shell.
* Real World User Issues:
QEMU runs maximized, but slow.
If you move cursor off of bottom, macros don't work.
Stutters in QEMU doing sound.
* $LK,"BMPRLE4To",A="MN:BMPRLE4To"$() has files_size too big by 108.
* Why is nontimer $LK,"Rand",A="MN:Rand"$() so bad?
* $LK,"FL:::/Adam/Gr/SpriteEd.CPP,789"$ Resize bitmap?
* More $LK,"CCtrl",A="MN:CCtrl"$.
* Add change-triangle-color to mesh editor.
* Add AVL binary tree support or red/black whatever that is. We have fixed-size stack. Auto-balancing binary tree is very needed. Where could we use?
* Maybe let committee decide if we want intern to make binary tree look-up using PSECT symbol addresses, so we can eliminate psect cache and wall-paper kludge. All HolyC functions and glbl vars would have left-right for address search.
* QEMU $LK,"tS",A="MN:tS"$ real-time-clock, slow Wenceslas.
* Is "GrSetSymmetry" or "GrSymmetry" better?
* DCF_TRANSFORMATION|DCF_SYMMETRY|DCF_JUST_MIRROR -- maybe not both needed at once.
* DiskCache during FileRead. CTRL-ALT-C, $LK,"Kill",A="MN:Kill"$().
* Help Index no mention of Symmetry in $LK,"GrLine",A="MN:GrLine"$() $LK,"GrLine3",A="MN:GrLine3"$().
* Get rid of BYTE WORD DWORD in opcode and replace with U8 U16 U32.
* 5/7/14:Something like AFSetIP.CPP caused hang, then reboot in TestSuite.
* 5/7/14:#63 Maybe, $LK,"::/Demo/Graphics/Pick3D.CPP"$ crashed in TestSuite.
* 6/8/14:After or in PageEntries2 in TestSuite crash.
* $$LK,L="FL:D:/Kernel/File.CPP"$$ instead of A=
* $$SP,B=1$$ instead of $$SP,BI=1$$
* $$CM+LE+RE is nasty
* FlatTop is torpedo, not bombs.
* BomberGolf is weird concept?
* Make a game, S.E.T.I., with radio telescope array. Put God on air.
* $LK,"Diff",A="MN:Diff"$() flags.
* Backward SHIFT-F3 is broken
* MOV U8 [RSP+RCX],DL
* Might want HeapLog x Cnt
* Find-and-replace text on $$PT$$ line before it.
* Compiler: Warn recurse class define?
* <CTRL-r> Text "$$" has no extents and deletes
* Exception msgs in Adam look bad
3sGCGCqCCe2G3EE2G3qDetDEFsDBDB
* $LK,"Mem32DevAlloc",A="MN:Mem32DevAlloc"$() is broken. Devices should be in free spot of E820 report.
* SPRITES in CMD Line code.
* Might want to move kernel code out of low 2Meg. Might be faster.
* F2 Macro on TestSuite
* 4/13/14 Strut or RawHide crashed when sys_var_init_flag etc
was set during testsuite.
* PSect search all tables if not found very well.
* asm LIST NOLIST bug
* Bible ranges.
* No way to clear +Hold entries
---------------------
$$=-CTASK_NEG_OFFSET
offset(CTask.addr)==0
Spawn(): CAlloc()
TaskFinishOff(): Free()
CSysFixedArea.adam
Looks like task_flags,locked_flags cause problems with neg offset.
---------------------
* 3/19/14: RESET during RawHide
* 2013? Wenceslas in TestSuite crashes, long time ago
* 12/26/13: Mountain in TestSuite didn't run right. Turned yellow, did nothing.
* FAQ frontloaded
COMPILER
* Postpone LocalVar Init until last possible moment. (in case RETURN)
* PtrArith MUL SIZE -->QueIns(MUL)?
* QueRem(IC_NOP)?
* Fix return result for GrBlot, ect.
* CTRL-r transform individual elements
* Size zero files don't copy out from VMware.
* FileMgr header (scrolled out of window?)
* ATA/ATAPI ID in VMware, when not booted to CD? I forgot.
* I use fixed-point in $LK,"Circle",A="MN:Circle"$(), $LK,"Ellipse",A="MN:Ellipse"$(), $LK,"GrRot",A="MN:GrRot"$(), $LK,"GrMulMat",A="MN:GrMulMat"$() and others.
God says I might want to change to float.
$LK,"::/Demo/Lectures/FixedPoint.CPP"$.
$LK,"::/Demo/Lectures/FixedPointAdvanced.CPP"$.
* DOCF_DBL_DOLLARS in reindention
* # in reindention
* HexEdit with odd size, ASCII cannot be edited.
* clean-up addDev pmt
* Might want to convert some Preempt() to Cli
* $LK,"Plain",A="MN:Plain"$() might be better not saving $LK,"CH_CURSOR",A="MN:CH_CURSOR"$.
* TRANSPARENT might not work with line ROPF_DITHER
* It would be nice if $LK,"U",A="MN:U"$() NOP were better.
* unhandled exception on MP message gets overwritten by WinMgr
* Cmd to enable/disable compiler warnings
* What if we had a type for either F64 or I64, like Print -- no conversion.
* What if we had a ... that did do conversion, if we have one that doesn't.
* fix documentation problem -- remembering 0 terminator in str or not for $$DA
* GetS, crazy putkey code
* editor page formatting is FUBAR
* $LK,"gr.screen_image",A="MN:CGrGlbls"$
>Might want to do ZOOM in U8 graphics and convert screen capture to U8
>Might want to reverse bit order
* return vals for grrect, grblot, grputchar?
* collisions for grrect, grblot, grputchar?
* Race condition in FlatTops.CPP.Z torpedo
* {Lock|Rep}{Seg|2E=NotBr|3E=Br}{OP}{ADD}{REX}
* Virtual Box MP reboot
* Std local var names
//After Egypt possible future ideas
//$LK,"Numbers,13:33",A="BF:Numbers,13:33"$ scouts
//$LK,"Numbers,21:8",A="BF:Numbers,21:8"$ snakes
* GrEdit: Move sidebar selected elems.
- Be careful of multipt elems.
* GrEdit: Strip origin shift cmds.
* GrEditBitMap, grabscroll?
* extern of fun with dft arg of str?
* We kinda need a routine to return how much free memory,
so that applications can plan a big alloc.
* FileMgr bad with lots of files.
* This $LK,"Fs->catch_except=TRUE",A="FF:::/Kernel/SrvCmd.CPP,Fs->catch_except=TRUE"$ causes problems because it
catches divide and out-of-mem. Not sure what to do, yet.
* Make $LK,"BSPStartMP",A="MN:BSPStartMP"$() start work after boot to reset multicores. Bonus for
freeing old task memory. (Prolly never gonna do anything about this.)
* $LK,"sys_var_init_flag",A="MN:sys_var_init_flag"$ local vars.
* sprite shift pts, ctrl pt for ellipse/polygon w,h is off when rotated.
* Window mgr needs to do DOC operations on posted messages from mouse.
Works for $LK,"IPSet",A="MN:IPSet"$(), though.
* Add local vars to sym table in $LK,"Dbg",A="MN:Dbg"$()? (maybe)
* $LK,"Bible sized nodes",A="FF:::/Adam/DolDoc/DocRecalcB.CPP,->tag+i"$
* Mouseinstall throws exceptions, doesn't work, investigate Mouse $LK,"0x9FC30",A="FF:::/Kernel/KbdMouse/Mouse.CPP,9FC"$
* get kbd lights working.
* Might have issue with compiler exceptions and restoring lex.hash tables.
* Generates two compiler error messages for expressions in statements.
* release semaphores or break lock sema,usb_td
* Fix Mom's secondary CD-ROM, dad's primary
* pmtstr in install didn't like focus change
*$FG,2$U0 Main()
{
U0 (*fp_old_draw_input_ptr)(CDC *dc,I64 x,I64 y)=gr.fp_draw_input_ptr;
}$FG$
* What about local variable array/struct initialization.
* Demo $LK,"ToHtml",A="MN:ToHtml"$().
* Del short name in FAT32--currently I do not check to see if I have generated
a unique short name and one can delete multiple files accidentally.
Generating unique short names is a pain in the ass because you have to scan
the whole directory. I think I just truncate the name instead of
"Program~1" or whatever. S081130-0001.BMP crashed windows--two identical
short names.
* OVERSTRIKE at cmd line with menu macro.
* $FG,2$lock{}$FG$ warning on invalid modes.
* Local array vars-->reg.
* $LK,"DCF_SYMMETRY",A="MN:DCF_SYMMETRY"$, before transformation? (Currently it's after)
* all graphics clipping -- screen y+top<0 for top<0
* Maybe convert graphics to float
* Warn unnecessary typecast
* compiler F32
* preempt(OFF) during graphic clipping?
* compiler optimization heap_glbls with added offset
* Might make FAT32 read in contiguous chunks.
* make Clamp(),Min(),Max() asm routines.
* Might make CSprite flood fill operate on a separate bitmap
and blotted at the end.
* autofile popup of popup
* <CTRL-r> delete subsprite in menu near others
* consider changing domenu so a real <ESC> on menu item doesn't select
(<SPACE> sends <ESC> followed by <SPACE> or something)
* puts3 with depth buf? might not do this
* make task queins and querem safe for multicore cycling through tasks (fwd).
* make better heapwalk, do something with _CFG_HEAP_DBG.
* log to file--would be inefficient--load-in whole file, modify and write out.
Useful, but not very efficient (TempleOS file system has no grow-file ability.
Created when FAT patent was an issue and wanted absly nothing people could sue
me for.)
* APIC2
* import intel datasheets, somehow?
* Get better dictionary, good spell checker.
* AutoComplete/Man Jmp for user code.
* Might make DskView show drive colors.
* Might do utility to set drive colors, making a tree entry in Adam 3 using
registry-like routines... or registry I guess.
* New Editor widgets
* Make use of flag potential in SysFilesFind and possibly CFileAccess
* implement fixed pos files
* new HolyC language features
* better debugging
* Too much preemption turned off?
* Look for mem leaks.
* Move stuff out of Kernel module.
* $LK,"ROP_XOR",A="MN:ROP_XOR"$ with pen_width>1 is broken.
* RGB wrong in BMP files.
* use width and height in line clipping for pen_width>1 or blot.
* SIMD transformation
* test removable media id (critical for resident files)
* add field overflow U8 "t='*'"
* Implement fmt codes into Get
* Date Input
* Default date fmt
* 16 bit Unassembly is bad--very low priority
* more signed int disassembly
* support r4u8 by adding 0x40 byte
* static var off of data heap.
* Might want to use U32*U32 multiplication.
* could add "const" to not set LF_NOT_CONST flag for trig, etc.
* do r,rm ICCmp like ICBrCmp
* could make glblvar imports use TY_RIP_DISP32.
* PUSH_CMP allocs reg R9 or whatever
* Might be problem with NOP in OPT pass1 for NO_PUSH in expressions besides
assignments. Is ShiftNoPush fully implemented?
* NOP1 might need to have diff ic_data's
* in divequal, it assumes about ebx
* error/warning line nums
* ASM branch out warning of range off by 1 line--use lx->last_line_num
* Switch statement with sparse cases (low priority)
* maybe inline functions?
* Use of more floating-point stk?
* More aggressive in this routine $LK,"CmpF2PushPop",A="MN:CmpF2PushPop"$() with types besides MOV and F64.
* !dbl ~dbl
* &=, |= can overflow with Bts Btr on small data types
* num lock comes on with break key
* sort options for findfiles
* Maybe, get rid of $LK,"0x20000",A="FF:::/Compiler/CMain.CPP,0x20000"$ in compiler.
$LK,"Hosea,6:6",A="BF:Hosea,6:6"$
$LK,"Hebrews,13:15",A="BF:Hebrews,13:15"$
$LK,"Psalms,50:14",A="BF:Psalms,50:14"$
>lspci -v
/*****************************************************************************/
$WW,1$This is the transcript of a radio conversation of a US naval ship with Canadian authorities off the coast of Newfoundland in October, 1995. Radio conversation released by the Chief of Naval Operations 10-10-95.
Americans: Please divert your course 15 degrees to the North to avoid a Collision.
Canadians: Recommend you divert YOUR course 15 degrees to the South to avoid a collision.
Americans: This is the Captain of a US Navy ship. I say again, divert YOUR course.
Canadians: No. I say again, you divert YOUR course.
Americans: This is the aircraft carrier USS Lincoln, the second largest ship in the United States' Atlantic fleet. We are accompanied by three destroyers, three cruisers and numerous support vessels. I demand that YOU change your course 15 degrees north, that's one five degrees north, or countermeasures will be undertaken to ensure the safety of this ship.
Canadians: This is a lighthouse. Your call.[2]
$WW,0$/*****************************************************************************/
/*****************************************************************************/
char *words[10000]; //Single word list. No statistical weights allowed.
int i=0;
while (true) {
while (!keyboard_hit())
i++;
printf("%s ",words[i%10000]);
}
/*****************************************************************************/
Size:$TX,"17784 KB",D="DD_TEMPLEOSCD_K_SIZE"$
/************************** $TX,"Perfect Coin Toss",HTML="http://hackaday.com/2014/12/19/nist-randomness-beacon/"$ ********************************/
$TX,"NIST Randomness Beacon",HTML="http://www.nist.gov/itl/csd/ct/nist_beacon.cfm"$ is a government certified random number. You can call
the caretaker on that page, Rene Peralta 301-975-8702, $TX,"rene.peralta@nist.gov",HTML="mailto:rene.peralta@nist.gov"$.
Once every minute, they have a random lottery and post the results to their
site. You can go back and check old lottery numbers, by entering link+time.
$TX,"https:/beacon.nist.gov/rest/record/1415440980",HTML="https:/beacon.nist.gov/rest/record/1415440980"$
$TX,"https:/beacon.nist.gov/rest/record/1415445300",HTML="https:/beacon.nist.gov/rest/record/1415445300"$ To check old numbers, enter
$TX,"https:/beacon.nist.gov/rest/record/1415529600",HTML="https:/beacon.nist.gov/rest/record/1415529600"$ Unix timestamp in the the URL.
$TX,"https:/beacon.nist.gov/rest/record/1415531580",HTML="https:/beacon.nist.gov/rest/record/1415531580"$ (Seconds since 1-JAN-1970)
$TX,"https:/beacon.nist.gov/rest/record/1415563680",HTML="https:/beacon.nist.gov/rest/record/1415563680"$ $TX,"Unix Timestamp Tool",HTML="http://www.epochconverter.com"$
$TX,"https:/beacon.nist.gov/rest/record/1415565600",HTML="https:/beacon.nist.gov/rest/record/1415565600"$
$TX,"https:/beacon.nist.gov/rest/record/1415566560",HTML="https:/beacon.nist.gov/rest/record/1415566560"$ They chain the numbers so they
$TX,"https:/beacon.nist.gov/rest/record/1415568120",HTML="https:/beacon.nist.gov/rest/record/1415568120"$ cannot be tampered with.
/*****************************************************************************/
Cop tying shoe: (After drive-by shooting, God said kid was not innocent, LOL.)
$HC,"<img src=\"https://goodtimestories.files.wordpress.com/2013/04/cop-tying-shoe-cambridge-county-pd.jpg\" width=\"480\" height=\"376\" alt=\"\">"$
$TX,"WWW.OSDEV.ORG",HTML="http://www.osdev.org"$
$TX,"Perfect Coin Toss",HTML="http://hackaday.com/2014/12/19/nist-randomness-beacon/"$
$TX,"Top 100 Movies",HTML="http://www.afi.com/100years/movies10.aspx"$
$TX,"Dr. David Pheanis",HTML="https://webapp4.asu.edu/directory/person/77201"$
$TX,"KeyPeele#1",HTML="http://www.youtube.com/watch?v=Dd7FixvoKBw"$
$TX,"KeyPeele#2",HTML="http://www.youtube.com/watch?v=VHG_Gv_zLY4"$
$TX,"ThePrisoner",HTML="http://www.youtube.com/watch?v=HRPDO63rI1E"$
$TX,"WestWorld",HTML="http://www.youtube.com/watch?v=LcL3eP0Hfy4"$
$TX,"Picard:FourLights",HTML="http://www.youtube.com/watch?v=o_eSwq1ewsU"$
$TX,"Dwight:NerdTorture",HTML="http://www.noob.us/humor/the-office-dwight-faces-nerd-torture-of-the-highest-form"$
$TX,"AliG:Homosapiens",HTML="http://www.youtube.com/watch?v=eB5VXJXxnNU&t=2m20s"$
$TX,"Dumb Guards",HTML="http://www.youtube.com/watch?v=OdKa9bXVinE"$
$TX,"Mapping the Commodore 64",HTML="http://unusedino.de/ec64/technical/project64/mapping_c64.html"$
Holy Grail: Lmq5PxHpLNw 1:28:27
$TX,"ATA/ATAPI Spec",HTML="http://www.t13.org/Documents/UploadedDocuments/docs2007/D1532v1r4b-AT_Attachment_with_Packet_Interface_-_7_Volume_1.pdf"$
$TX,"BBC",HTML="http://www.knpr.org/"$
$TX,"BBC_Five_Live",HTML="http://www.bbc.co.uk/radio/player/bbc_radio_five_live"$
$TX,"KNPR",HTML="http://www.knpr.org/"$
$TX,"C64 Users Guide",HTML="http://www.commodore.ca/manuals/c64_users_guide/c64-users_guide.htm"$
$TX,"C64 Programmers Reference Guide",HTML="http://www.commodore.ca/manuals/c64_programmers_reference/c64-programmers_reference.htm"$
1) Strings, Opcode in Compiler
2) FizzBuzz
3) Negative displacements
4) Multicore
5) Preempt
6) Graphics
+40
View File
@@ -0,0 +1,40 @@
$TR-UL,"Adam"$
$ID,2$$TR,"SysMsgFlags"$
$ID,2$sys_msg_flags[0]=0xFB;
$ID,-2$$TR,"SysRegVer"$
$ID,2$registry_version=3.030;
$ID,-2$$ID,-2$$TR-C-UL,"TempleOS"$
$ID,2$$TR,"CircleTrace"$
$ID,2$F64 best_score=4.9425;
$ID,-2$$TR,"DiningStars"$
$ID,2$F64 best_score=9999.0000;
$ID,-2$$TR,"DunGen"$
$ID,2$F64 best_score=20.5295;
$ID,-2$$TR,"CastleFrankenstein"$
$ID,2$F64 best_score=33.8405;
$ID,-2$$TR,"ZoneOut"$
$ID,2$F64 best_score=50.3318;
$ID,-2$$TR,"BugBird"$
$ID,2$F64 best_score=18.2332;
$ID,-2$$TR,"TimeOut"$
$ID,2$I64 best_score=21532;
$ID,-2$$TR,"RawHide"$
$ID,2$F64 best_score=81.1088;
$ID,-2$$TR,"KeepAway"$
$ID,2$I64 best_score0=0,best_score1=9999;
$ID,-2$$TR,"XCaliber"$
$ID,2$I64 best_score=248;
I64 msg_flags=1;
$ID,-2$$TR,"Wenceslas"$
$ID,2$F64 best_score=62.7035;
$ID,-2$$TR,"BomberGolf"$
$ID,2$I64 best_score=32;
$ID,-2$$TR,"EagleDive"$
$ID,2$I64 best_score=4;
$ID,-2$$TR,"Varoom"$
$ID,2$F64 best_score=11.8623;
$ID,-2$$TR,"BlackDiamond"$
$ID,2$I64 best_score=1;
$ID,-2$$TR,"TOS"$
$ID,2$I64 tos_code_walk_thru=101,tos_after_egypt_in_action=46;
$ID,-2$$ID,-2$
+84
View File
@@ -0,0 +1,84 @@
#define SLOP BLK_SIZE
U0 TOSBootRescueDrv1()
{
CBinFile *bfh=sys_boot_base-sizeof(CBinFile);
bfh(I64)+=bfh->file_size-1;
DefinePrint("TOS_BOOT_RESCUE_DRV","0x%X",CeilI64(SYS_KERNEL_END+SLOP,BLK_SIZE));
DefinePrint("TOS_BOOT_RESCUE_DRV_END", "0x%X",FloorI64(
(BOOT_RAM_LIMIT-(BOOT_STK_SIZE+CD_BOOT_LOADER_SIZE))>>4<<4-
(bfh(I64)-SYS_KERNEL_END)-SLOP,BLK_SIZE));
DefinePrint("CFG_BOOT_RESCUE_DRV_FILE","\"/Temp/BootRescueDrv.BIN.Z\"");
} TOSBootRescueDrv1;
U0 TOSBootRescueDrv2()
{
DefinePrint("CFG_BOOT_RESCUE_DRV","\"a10x%X\n0x%X\n\"",TOS_BOOT_RESCUE_DRV,
(TOS_BOOT_RESCUE_DRV_END-TOS_BOOT_RESCUE_DRV)/BLK_SIZE);
DefinePrint("CFG_BOOT_RESCUE_DRV_START","\"0x%X\"",TOS_BOOT_RESCUE_DRV);
} TOSBootRescueDrv2;
U0 TOSInit()
{
CATARep *root=NULL,*ata_drv=NULL,*atapi_drv=NULL;
CBlkDev *bd;
switch (tos_cid) {
case CID_DFT:
DefinePrint("CFG_RAM_DRVS","\"b1\nScale2Mem(2048,0x280000,4*1024*1024*1024)\n\"");
if (dsk.auto_mount_ide_cnt) {
//If AutoMount was successful, No need to manually mount in next compile
DefinePrint("CFG_HARD_DRVS","\"\"");
DefinePrint("CFG_CDROM_DRVS","\"\"");
} else {
//These two are a crazy guess. ATA:IDE Primary ATAPI:IDE Secondary
DefinePrint("CFG_HARD_DRVS","\"c2s0x1F0\n0x3F4\n0\"");
DefinePrint("CFG_CDROM_DRVS","\"t3s0x170\n0\"");
bd=Let2BlkDev(':');
if (bd->type==BDT_ATAPI) {
ATARep(FALSE,,&root);
ATAIDDrvs(root,dsk.boot_drv_let,&ata_drv,&atapi_drv);
if (ata_drv)
DefinePrint("CFG_HARD_DRVS","\"c2p%d\n\"",ata_drv->num);
if (atapi_drv)
DefinePrint("CFG_CDROM_DRVS","\"t3p%d\n\"",atapi_drv->num);
} else {
try {
bd=Let2BlkDev('C');
DefinePrint("CFG_HARD_DRVS","\"c2s0x%X\n0x%X\n%d\"",
bd->base0,bd->base1,bd->unit);
} catch
Fs->catch_except=TRUE;
try {
bd=Let2BlkDev('T');
DefinePrint("CFG_CDROM_DRVS","\"t3s0x%X\n%d\"",bd->base0,bd->unit);
} catch
Fs->catch_except=TRUE;
}
}
DefinePrint("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
DefinePrint("TOS_HDS","\"CD\"");
DefinePrint("TOS_MASTER_BOOT_DRVS","\"C\"");
}
} TOSInit;
U0 TOSDrvTextAttrSet()
{
DrvTextAttrSet('C', WHITE <<4|BLUE); //Main
DrvTextAttrSet('D', WHITE <<4|RED); //Back-up
DrvTextAttrSet('A', BLUE <<4|BROWN); //Rescue
DrvTextAttrSet('B', BLUE <<4|YELLOW);//RAM
DrvTextAttrSet('T', LTGRAY<<4|BLUE); //CDROM
} TOSDrvTextAttrSet;
#define TOS_ISO_NAME "B:/TempleOSCD.ISO"
#define TOS_DISTRO_DIR "B:/Distro"
#define CFG_OPTS "AutoMountIDE\nCT\n"
#define CFG_DBG_OPTS "AutoMountIDE\nCT"\
"HeapInit\n130\nMemInit\n131\nVarInit\n132\n\n"
#define CFG_DBGZ_OPTS "AutoMountIDE\nCT"\
"HeapInit\n0\nMemInit\n0\nVarInit\n0\n\n"
#define TOS_CFG "\n" CFG_RAM_DRVS CFG_CDROM_DRVS CFG_HARD_DRVS "\n" CFG_DSK_CACHE CFG_OPTS
#define TOS_CDROM_CFG "Tb1\n0x20000\nt3 \n\n\nAutoMountIDE\nCT\n"
#define TOS_CDROM_DBG_CFG "A" CFG_BOOT_RESCUE_DRV "b1\nScale2Mem(2048,0x40000)\n\n\n"\
"DontProbe\nBootRescueDrv\n" "C:" CFG_BOOT_RESCUE_DRV_FILE "\n" CFG_BOOT_RESCUE_DRV_START "\n\n"
+509
View File
@@ -0,0 +1,509 @@
//The CFG defines are $LK,"::/Home/TOSCfg.CPP",A="FI:::/Demo/AcctExample/TOSCfg.CPP"$.
U8 TOSGetDrv()
{
I64 result;
"Drive (%s):",TOS_HDS;
result=ToUpper(GetChar);
'\n';
return result;
}
U0 TOSMakeOSDrvBootInstall(U8 drv_let)
{
drv_let=ToUpper(drv_let);
Auto(TOS_CFG);
MakeOSDrvBootInstall(drv_let);
if (StrOcc(TOS_MASTER_BOOT_DRVS,drv_let))
MasterBootIntall(drv_let);
}
U0 TOSCopyDrv(U8 src,U8 dst)
{
U8 buf_s[128],buf_d[128];
src=ToUpper(src);
dst=ToUpper(dst);
Fmt(dst,,FALSE,DVT_FAT32);
StrPrint(buf_s,"%c:/",src);
StrPrint(buf_d,"%c:/",dst);
CopyTree(buf_s,buf_d);
DocClear;
Drv(dst);
TOSMakeOSDrvBootInstall(dst);
}
U0 TOSPromptAndCopyDrv()
{
I64 src,dst;
"$$RED$$\nCopy Src Drive:\n$$FG$$";
src=TOSGetDrv;
"$$RED$$\nCopy Dst Drive:\n$$FG$$";
dst=TOSGetDrv;
TOSCopyDrv(src,dst);
}
public U0 CursorRemFile(U8 *filename)
{
CDoc *doc;
doc=DocRead(filename,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
DocWrite(doc);
DocDel(doc);
}
public U0 CursorRem(U8 *files_find_mask="*")
{
I64 fuf_flags=0;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+T+f+F+O");
CDirEntry *tempde=FilesFind(files_find_mask,fuf_flags),*tempde1=tempde;
while (tempde) {
CursorRemFile(tempde->full_name);
Touch(tempde->full_name,"",,tempde->datetime);
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
U0 UncollapseFile(U8 *filename,I64 *)
{
CDoc *doc=DocRead(filename,DOCF_NO_CURSOR);
DocCollapse(FALSE,doc);
DocWrite(doc);
DocDel(doc);
}
U0 Uncollapse(U8 *files_find_mask="*",U8 *fu_flags=NULL)
{
I64 fuf_flags=0;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+f+F+T+O");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
CDirEntry *tempde=FilesFind(files_find_mask,fuf_flags),*tempde1=tempde;
while (tempde && !Bt(&fuf_flags,FUf_CANCEL)) {
UncollapseFile(tempde->full_name,&fuf_flags);
Touch(tempde->full_name,"",,tempde->datetime);
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
public U0 CopySongs(U8 threshold='7')
{
CDoc *s;
CDocEntry *doc_e;
CDirEntry *tempde=FilesFind("::/Home/Psalmody/*.CPP*",FUF_CLUSTER_ORDER),*tempde1=tempde;
DelTree("/Apps/Psalmody/Examples");
MkDir("/Apps/Psalmody/Examples");
while (tempde) {
s=DocRead(tempde->full_name);
doc_e=s->root.next;
if (doc_e->type_u8==DOCT_TEXT && doc_e->tag[2]>=threshold)
Copy(tempde->full_name,"/Apps/Psalmody/Examples");
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
U0 DistroPrep()
{
Del("/Demo/WebLogExample/WebLogRep.TXT*");
Del("/Demo/ReverseFileExample/PoemForeward.TXT*");
DelTree("/Home/*Temp.TXT.Z");
CopySongs;
DelTree("/Temp");
MkDir("/Temp");
MkDir("/Temp/ScreenShots");
Touch("/PersonalMenu.TXT.Z","+T");
Touch("/Home/PersonalMenu.TXT.Z","+T");
DelTree("/Demo/AcctExample");
CopyTree("/Home","/Demo/AcctExample");
DelTree("/Demo/AcctExample/Archive");
DelTree("/Demo/AcctExample/Budget");
DelTree("/Demo/AcctExample/Psalmody");
DelTree("/Demo/AcctExample/Wb2");
Del("/Demo/AcctExample/Test*");
//Once in a while, do these:
// SortHeaders;
// DocOpt("/*");
// DblSpaceScan("/*");
CursorRem("/*");
DelTree("/Demo/*.BI*");
S2T("/*","+r+S");
DocOpt("/*");
Move(ACD_DEF_FILENAME,ACD_DEF_FILENAME_Z);
}
U0 MakeBootRescueDrvFile()
{
try
Let2Drv('A');
catch {
Fs->catch_except=TRUE;
Auto(CFG_BOOT_RESCUE_DRV "\n");
Mount;
}
CBlkDev *bd=Let2BlkDev('A');
Fmt('A',,FALSE,DVT_REDSEA);
MkDir("A:/Compiler");
Copy("C:/Compiler/Compiler.BIN.Z", "A:/Compiler");
Copy("C:/Compiler/OpCodes.TXT.Z", "A:/Compiler");
Copy("C:/Compiler/CompilerA.HPP.Z", "A:/Compiler");
Copy("C:/Compiler/CompilerB.HPP.Z", "A:/Compiler");
MkDir("A:/Kernel");
Copy("C:/Kernel/*.HPP*", "A:/Kernel");
CopyTree("C:/Kernel/Dsk", "A:/Kernel/Dsk");
Copy("C:/Home/Wb2/Files/DbgAdam.CPP.Z","A:/Adam.CPP.Z");
MkDir("A:/Adam");
Copy("C:/Adam/AExts.HPP.Z", "A:/Adam");
Copy("C:/Adam/AMath.CPP.Z", "A:/Adam");
Copy("C:/Adam/Training.CPP.Z","A:/Adam");
Copy("C:/Adam/AUtils.CPP.Z", "A:/Adam");
Copy("C:/Adam/AMathODE.CPP.Z","A:/Adam");
FileWrite("C:" CFG_BOOT_RESCUE_DRV_FILE,bd->RAM_dsk,(bd->max_blk+1)<<BLK_SIZE_BITS);
}
U0 MakeSymFiles()
{
CDoc *doc;
U8 *st;
DocClear;
DocMax;
HashTablePurge(adam_task->hash_table);
Who;
if (doc=DocPut) {
st=StrNew(doc->filename.name);
StrCpy(doc->filename.name,"D:/Wb/Home/Wb2/SymsAlpha.TXT.Z");
DocWrite(doc);
StrCpy(doc->filename.name,st);
Free(st);
}
DocClear;
DocMax;
Who("+m");
if (doc=DocPut) {
st=StrNew(doc->filename.name);
StrCpy(doc->filename.name,"D:/Wb/Home/Wb2/SymsAddress.TXT.Z");
DocWrite(doc);
StrCpy(doc->filename.name,st);
Free(st);
}
DocClear;
}
I64 MakeLineRepFile()
{
U8 *st;
CDoc *doc;
I64 result,official;
CDocEntry *tree_branch,*start_indent,*end_indent;
DocClear;
Drv('C');
DistroPrep;
Cd("C:/");
DelTree("B:/TOS");
CopyTree("C:/Home","B:/TOS");
DelTree("C:/Home");
DocMax;
DocClear;
result=LineRep;
if (doc=DocPut) {
st=StrNew(doc->filename.name);
StrCpy(doc->filename.name,"B:/TOS/Wb2/LineRep.TXT.Z");
DocWrite(doc);
StrCpy(doc->filename.name,st);
Free(st);
}
DocClear;
official=LineRep("C:/*","-r")+
LineRep("C:/Adam/*")+
LineRep("C:/Compiler/*","-S+T")+
LineRep("C:/Kernel/*");
DocClear;
CopyTree("B:/TOS","C:/Home");
DelTree("B:/TOS");
doc=DocRead("C:/Adam/ADefine.CPP.Z");
DocTreeFind(doc,"LineRep",&tree_branch,&start_indent,&end_indent);
DocCut(doc,start_indent->next,end_indent->last);
doc->cur_entry=start_indent->next;
doc->cur_data_col=0;
DocPrint(doc,"DefinePrint(\"DD_TEMPLEOS_LOC\",\"%,d\");\n",result);
DocPrint(doc,"DefinePrint(\"DD_TEMPLEOS_LOC_OFFICIAL\",\"%,d\");\n",official);
DefinePrint("DD_TEMPLEOS_LOC","%,d",result);
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","%,d",official);
DocWrite(doc);
DocDel(doc);
"Total LOC:%12,d\n\n",result;
return result;
}
U0 TOSDistroPrep()
{/*This is the TempleOS internal distro. Only run this on a
virtual machine, not bare metal hardware because it's settings could cause
problems. The hard drive must be partitioned. Install Std Distro, then
install this on top.
>$LK,"TSInstall",A="FF:::/Demo/AcctExample/TOSDistro.CPP,TSInstall"$;
>$LK,"TSUpgrade",A="FF:::/Demo/AcctExample/TOSDistro.CPP,TSUpgrade"$;
See $LK,"MakeDistrosAndBackUp",A="FF:::/Demo/AcctExample/TOSDistro.CPP,MakeDistrosAndBackUp"$() to reproduce the ISO's in $FG,4$E:/Wb$FG$. It makes this
website, too.
*/
Drv('C');
DistroPrep;
Auto(TOS_CDROM_CFG);
MakeOSDrvBootInstall('C','T');
DelTree(TOS_DISTRO_DIR);
CopyTree("C:/",TOS_DISTRO_DIR "/");
}
U0 MakeTOSDistro()
{
TOSDistroPrep;
CDFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
DefinePrint("DD_TEMPLEOSTS_SIZE",
"Download $TX,"TempleOS V3.02",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
Drv('C');
}
U0 DbgDistroPrep()
{/*This is a debug distro. The CDROM bootloader uses BIOS INT 0x13 0x42 to
load Kernel.BIN.C which has been modified to also hold a small RAM drive
(Drive A) that fits in the low 640k. The bootloader starts in real mode
and the kernel changes to long, 64-bit mode. It loads the 64-bit compiler
and assembler, compiles some, but not all, of the normal start-up scripts
and drops you off at the $LK,"Dbg",A="MN:Dbg"$ command-line where you can JIT compile,
use $LK,"EdLite",A="MN:EdLite"$ on RAM files, and use many of the other normal Kernel commands.
I could not fit all the normal start-up scripts into the small RAM drive,
so you do not have the window manager or normal document framework. You
should have many Gig of RAM to play with with RAM Drive B, a high memory
RAM drive, but you have only those few files. When I generate this distro,
I call $LK,"MakeBootDrvFile",A="FF:::/Demo/AcctExample/TOSDistro.CPP,MakeBootRescueDrvFile"$.
*/
Drv('C');
DistroPrep;
MakeBootRescueDrvFile;
Auto(TOS_CDROM_DBG_CFG);
MakeOSDrvBootInstall('C','T');
DelTree(TOS_DISTRO_DIR);
CopyTree("C:/",TOS_DISTRO_DIR "/");
Del("C:" CFG_BOOT_RESCUE_DRV_FILE);
}
U0 MakeDbgDistro()
{
DbgDistroPrep;
CDFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
DefinePrint("DD_TEMPLEOSDBG_SIZE",
"Download $TX,"TempleOS V3.02",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1f MB)",
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
Drv('C');
}
U0 StdDistroPrep()
{
Drv('C');
DistroPrep;
Auto(STD_DISTRO_CDROM_CFG);
MakeOSDrvBootInstall('C','T');
DelTree(TOS_DISTRO_DIR);
CopyTree("C:/",TOS_DISTRO_DIR "/");
DelTree(TOS_DISTRO_DIR "/Home");
MkDir(TOS_DISTRO_DIR "/Home");
Del(TOS_DISTRO_DIR "/0000Boot/OldMBR.BIN.C");
Del(TOS_DISTRO_DIR "/0000Boot/BootMHD2.BIN.C");
}
U0 MakeStdDistro()
{
StdDistroPrep;
CDFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
Drv('C');
}
U0 LiteDistroPrep()
{/*Missing: Dictionary, Bible and TOSZ Utility. Still 100% OpenSource.
Includes: x86_64 64BitMultiCoredKernel, 64BitCompiler, Assembler,
Unassembler, Debugger, Editor, VGAGraphics, Tools, BootLoaders,
Keyboard&Mouse, HardDrives, FAT32, Partitioner, CD/DVD, ISO9660FileCreator,
FileManager, WindowManager, PCSpeaker, Apps, Games, God-Oracle-App, Hymns,
Demos, Documentation.
*/
StdDistroPrep;
DelTree(TOS_DISTRO_DIR "/Linux");
Del(TOS_DISTRO_DIR "/Adam/AutoComplete/ACDefs.DAT*");
Del(TOS_DISTRO_DIR "/Misc/PCIDevices.TXT.Z");
Del(TOS_DISTRO_DIR "/Misc/Bible.TXT.Z");
}
U0 MakeLiteDistro()
{
LiteDistroPrep;
CDFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
DefinePrint("DD_TEMPLEOSLITE_SIZE",
"Download $TX,"TempleOS V3.02",D="DD_OS_NAME_VERSION"$ - Lite Distro (%0.1f MB)",
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
Drv('C');
}
U0 UltraDistroPrep()
{/*Missing: Apps, Demos, Dictionary, Bible and TOSZ Utility. Still 100% OpenSource.
Includes: x86_64 64BitMultiCoredKernel, 64BitCompiler, Assembler,
Unassembler, Debugger, Editor, VGAGraphics, Tools, BootLoaders,
Keyboard&Mouse, HardDrives, FAT32, Partitioner, CD/DVD, ISO9660FileCreator,
FileManager, WindowManager, PCSpeaker, Documentation.
*/
LiteDistroPrep;
DelTree(TOS_DISTRO_DIR "/Apps");
DelTree(TOS_DISTRO_DIR "/Demo");
DelTree(TOS_DISTRO_DIR "/Misc/Tour");
Del(TOS_DISTRO_DIR "/Adam/AutoComplete/ACWords.DAT*");
Del(TOS_DISTRO_DIR "/Adam/God/Vocab.TXT.Z");
Del(TOS_DISTRO_DIR "/Misc/OSTestSuite.CPP.Z");
}
U0 MakeUltraDistro()
{
UltraDistroPrep;
CDFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
DefinePrint("DD_TEMPLEOSULTRA_SIZE",
"Download $TX,"TempleOS V3.02",D="DD_OS_NAME_VERSION"$ - UltraLite Distro (%0.1f MB)",
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
Drv('C');
}
U0 TOSWebFile(U8 *name)
{
U8 *name2;
CDirEntry de;
if (FileFind(name,&de)) {
Free(de.full_name);
"File:%s\n",name;
UncollapseFile(name,NULL);
Touch(name,"",,de.datetime);
name2=ChgExt(name,"html");
ToHtml(name,name2,
"<title>The Temple Operating System</title>\n"
"<meta name=\"keywords\" content=\"Operating System,64-Bit,64 Bit,Temple,OS,TempleOS,Free,Open Source,Public Domain,x86_64\">\n"
);
Touch(name2,"",,de.datetime);
Free(name2);
}
}
U0 MakeWebSite()
{
CDirEntry *tempde,*tempde1;
DocClear;
Cd("D:/Wb");
DelTree("D:/Wb/Home/Archive");
DelTree("D:/Wb/Home/Budget");
DelTree("D:/Wb/Home/Psalmody");
Del("D:/Wb/Home/*");
Touch("D:/Wb/Home/Wb2/index.TXT.Z","",,Now);
Touch("D:/Wb/Home/Wb2/Downloads.TXT.Z","",,Now);
Touch("D:/Wb/Home/Wb2/TempleOS.TXT.Z","",,Now);
tempde=tempde1=FilesFind("*",FUF_RECURSE|FUF_JUST_FILES|FUF_JUST_TXT|FUF_CLUSTER_ORDER);
while (tempde) {
TOSWebFile(tempde->full_name);
tempde=tempde->next;
}
DirTreeDel(tempde1);
Drv('C');
}
U0 FreshenWebDir(U8 *dirname)
{//No recurse
CDirEntry *tempde,*tempde1;
U8 *src,*dst;
src=MStrPrint("D:/Wb%s/*",dirname);
Del(src);
Free(src);
src=MStrPrint("C:%s/*",dirname);
dst=MStrPrint("D:/Wb%s",dirname);
Copy(src,dst);
Free(src);
Free(dst);
src=MStrPrint("D:/Wb%s/*",dirname);
tempde=tempde1=FilesFind(src,FUF_JUST_FILES|FUF_JUST_TXT|FUF_CLUSTER_ORDER);
while (tempde) {
TOSWebFile(tempde->full_name);
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
U0 MakeWebSitePartial()
{
FreshenWebDir("/Home/Wb2");
Drv('C');
}
U0 UpdateISODocDefines()
{
DefinePrint("DD_TEMPLEOSCD_SIZE",
"Download $TX,"TempleOS V3.02",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
0.1*(10*Size("D:/Wb/TempleOSCD.ISO","+s")/1024/1024));
DefinePrint("DD_TEMPLEOSCD_K_SIZE",
"%d KB",Size("D:/Wb/TempleOSCD.ISO","+s")/1024);
DefinePrint("DD_TEMPLEOSULTRA_SIZE",
"Download $TX,"TempleOS V3.02",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.1f MB)",
0.1*(10*Size("D:/Wb/TempleOSUltra.ISO","+s")/1024/1024));
DefinePrint("DD_TEMPLEOSULTRA_K_SIZE",
"%d KB",Size("D:/Wb/TempleOSUltra.ISO","+s")/1024);
}
UpdateISODocDefines;
public U0 MakeDistrosAndBackUp()
{
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
progress4=*progress4_desc=0;
progress4_max=13;
AutoComplete;
WinMax;
WinBorder;
ChkAll; progress4++;
MakeLineRepFile; progress4++;
TOSCopyDrv('C','D'); progress4++;
DelTree ("D:/Wb"); progress4++;
CopyTree("C:/","D:/Wb"); progress4++;
DocClear;
MakeStdDistro; progress4++;
DocClear;
Copy(TOS_ISO_NAME,"D:/Wb/TempleOSCD.ISO"); progress4++;
MakeUltraDistro; progress4++;
DocClear;
Copy(TOS_ISO_NAME,"D:/Wb/TempleOSUltra.ISO"); progress4++;
UpdateISODocDefines;
Cd("C:/");
if (LinkChk)
throw;
progress4++;
MakeSymFiles; progress4++;
MakeWebSite; progress4++;
Drv('C');
ChkAll; progress4++;
progress4=progress4_max=0;
SettingsPop;
}
@@ -37,10 +37,11 @@ public U8 *FileNameNumNext(U8 *files_find_mask,U8 *fmt)
U0 DCImgWrite(CDC *dc)
{
U8 *st=FileNameNumNext("::" TS_BLOG_DIR "/Img*","::" TS_BLOG_DIR "/Img%03d.BMP"),*st2;
st2=MStrPrint("http://www.templeos.org/Wb%s",st+2);
BMPFileWrite(st,dc);
Free(st);
U8 *st1=FileNameNumNext("::/Home/Wb2/Imgs/Img*",
"::/Home/Wb2/Imgs/Img%03d.BMP"),
*st2=MStrPrint("http://www.templeos.org/Wb%s",st1+2);
BMPWrite(st1,dc);
Free(st1);
"$$HC,\"<img src=\\\"%s\\\" width=\\\"%d\\\" height=\\\"%d\\\" alt=\\\"\\\">\"$$\n",st2,dc->width,dc->height;
Free(st2);
}
@@ -61,7 +62,7 @@ U0 BlogScreenShot()
DocCursor(old_cursor);
}
U8 *WebBookMarks(U8 *filename="HOME/Archive/Bookmarks.html")
U8 *WebBookMarks(U8 *filename="::/Home/Archive/Bookmarks.html")
{
U8 *st;
CDocEntry *doc_e;
@@ -90,6 +91,45 @@ U8 *WebBookMarks(U8 *filename="HOME/Archive/Bookmarks.html")
return st;
}
U8 *TopMoviesRead(U8 *filename="C:/Home/Wb2/Files/Movies.TXT.Z",
I64 line)
{
U8 *result=NULL;
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT_WITH_TABS);
if (DocLineNumGoTo(doc,line-1) && doc->cur_entry->type_u8==DOCT_TEXT)
result=StrNew(doc->cur_entry->tag);
DocDel(doc);
return result;
}
U8 *TopMoviesWrite(U8 *filename="C:/Home/Wb2/Files/Movies.TXT.Z",
I64 line,U8 *st)
{
U8 *result=NULL;
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT_WITH_TABS);
if (DocLineNumGoTo(doc,line-1)) {
if (doc->cur_entry->type_u8==DOCT_TEXT) {
Free(doc->cur_entry->tag);
doc->cur_entry->tag=StrNew(st);
} else
DocPrint(doc,"%s",st);
DocTop(doc);
DocWrite(doc);
}
DocDel(doc);
return result;
}
class CTopMoviesForm
{
U8 tag[136];
U8 special[136];
I64 timestamp;
I64 cert fmtstr "$$DA,32,A=\"Movie #1-100 :%d\"$$\n";
I64 min;
I64 sec;
};
class CWebBookMarkForm
{
U8 tag[136] fmtstr "$$DA-P,135,A=\"Tag Text :%s\"$$\n";
@@ -120,6 +160,16 @@ class CYouTubeForm
I64 sec fmtstr "$$DA,32,A=\"Seconds :%d\"$$\n";
};
class CTopMoviesYouTubeForm
{
U8 tag[136] fmtstr "$$DA-P,135,A=\"Movie :%s\"$$\n";
U8 special[136] fmtstr "$$DA-P,135,A=\"SerialNum:%s\"$$\n";
I64 timestamp;
I64 cert;
I64 min fmtstr "$$DA,32,A=\"Minutes :%d\"$$\n";
I64 sec fmtstr "$$DA,32,A=\"Seconds :%d\"$$\n";
};
class CImgurForm
{
U8 tag[136];
@@ -208,10 +258,9 @@ U0 MyBibleLines(U8 *st,I64 num_lines,I64 radix,Bool modulo,Bool plus_one)
i=Str2I64(st,radix);
if (modulo) {
DocPrint(doc_out,"$TX,"(Modulo is just remainder.)",HTML="http://en.wikipedia.org/wiki/Modulo_operation"$\n");
if (radix==16)
DocPrint(doc_out,"0x%s-->",st);
DocPrint(doc_out,"(%d mod %d)",i,ST_BIBLE_LINES-(num_lines-1));
DocPrint(doc_out,"(%d remainder when divided by %d)",i,ST_BIBLE_LINES-(num_lines-1));
start=i%(ST_BIBLE_LINES-(num_lines-1));
} else {
if (radix==16)
@@ -223,7 +272,7 @@ U0 MyBibleLines(U8 *st,I64 num_lines,I64 radix,Bool modulo,Bool plus_one)
start++;
DocPrint(doc_out,"+1");
}
DocPrint(doc_out,"-->Line:%d\n\n",start);
DocPrint(doc_out,"-->Line:%d\n",start);
verse=BibleLine2Verse(start);
DocPrint(doc_out,"$TX,"KingJamesBible",HTML="http://www.templeos.org/files/BIBLE.TXT"$ (%s) God says...\n$$RED$$",verse);
@@ -259,7 +308,7 @@ U0 MyBibleLines(U8 *st,I64 num_lines,I64 radix,Bool modulo,Bool plus_one)
}
}
#define NIST_TIME_OFFSET 17586
#define NIST_TIME_OFFSET 21082
public U0 SyncNIST()
{
@@ -276,22 +325,21 @@ public U0 SyncNIST()
}
}
U0 FillInMyURL()
U0 InsMyURL()
{
U8 *tag,*st,*st2;
CWebBibleForm *url=CAlloc(sizeof(CWebBibleForm));
url->timestamp=
FloorI64((Now-Str2Date("1/1/1970"))/CDATE_FREQ+NIST_TIME_OFFSET,60);
switch (PopUpPickLst("NISTBeacon\0WebBible\0YouTube\0Imgur\0Wikipedia\0RandomNumbers.info\0"
"Random.org\0VirtualNotary\0Nist\0HotBits\0GenerateData\0WebBookMark\0")) {
"Random.org\0VirtualNotary\0Nist\0HotBits\0GenerateData\0WebBookMark\0"
"Roulette\0Movie\0")) {
case 0:
if (DocFormDo(url(CRandHexBeaconForm *))) {
"$$TX,\"National Institute of Standards Public Randomness Beacon\","
"HTML=\"http://beacon.nist.gov/home\"$$\n\n"
"$$TX,\"Guidelines for Talking with God\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n\n";
tag=MStrPrint("http://beacon.nist.gov/rest/record/%d",url->timestamp);
"$$TX,\"%Q\",HTML=\"%Q\"$$\n\n",tag,tag;
"$$TX,\"Guidelines for Talking with God.\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
tag=MStrPrint("https:/beacon.nist.gov/rest/record/%d",url->timestamp);
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
Free(tag);
MyBibleLines(url->special,20,16,TRUE,TRUE);
}
@@ -343,30 +391,30 @@ U0 FillInMyURL()
case 5:
if (DocFormDo(url(CRandDecForm *))) {
"$$TX,\"Guidelines for Talking with God\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n\n";
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
tag="http://www.randomnumbers.info";
"$$TX,\"%Q\",HTML=\"%Q\"$$\n\n",tag,tag;
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
MyBibleLines(url->special,20,10,FALSE,TRUE);
}
break;
case 6:
if (DocFormDo(url(CRandDecForm *))) {
"$$TX,\"Guidelines for Talking with God\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n\n";
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
tag="http://www.random.org";
"$$TX,\"%Q\",HTML=\"%Q\"$$\n\n",tag,tag;
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
MyBibleLines(url->special,20,10,FALSE,FALSE);
}
break;
case 7:
if (DocFormDo(url(CRandCertForm *))) {
"$$TX,\"Guidelines for Talking with God\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n\n";
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
tag="http://virtual-notary.org";
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
tag="Here is the certificate";
st=MStrPrint("http://www.templeos.org/Certs/virtual-notary-cert-randomnum-%d.p12",url->cert);
"\n$$TX,\"%Q: %d\",HTML=\"%Q\"$$.\n\n",tag,url->cert,st;
"\n$$TX,\"%Q: %d\",HTML=\"%Q\"$$.\n",tag,url->cert,st;
Free(st);
MyBibleLines(url->special,20,10,FALSE,FALSE);
}
@@ -374,27 +422,27 @@ U0 FillInMyURL()
case 8:
if (DocFormDo(url(CRandHexForm *))) {
"$$TX,\"Guidelines for Talking with God\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n\n";
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
tag="http://qrng.anu.edu.au/NIST.php";
"$$TX,\"%Q\",HTML=\"%Q\"$$\n\n",tag,tag;
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
MyBibleLines(url->special,20,16,TRUE,TRUE);
}
break;
case 9:
if (DocFormDo(url(CRandHexForm *))) {
"$$TX,\"Guidelines for Talking with God\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n\n";
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
tag="https://www.fourmilab.ch/hotbits/secure_generate.html";
"$$TX,\"%Q\",HTML=\"%Q\"$$\n\n",tag,tag;
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
MyBibleLines(url->special,20,16,TRUE,TRUE);
}
break;
case 10:
if (DocFormDo(url(CRandDecForm *))) {
"$$TX,\"Guidelines for Talking with God\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n\n";
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
tag="http://www.generatedata.com";
"$$TX,\"%Q\",HTML=\"%Q\"$$\n\n",tag,tag;
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
MyBibleLines(url->special,20,10,FALSE,FALSE);
}
break;
@@ -407,6 +455,44 @@ U0 FillInMyURL()
Free(st);
}
break;
case 12:
if (DocFormDo(url(CRandDecForm *))) {
"$$TX,\"Guidelines for Talking with God\","
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
tag="https://www.dublinbet.com/casino_game.html?mode=demo&game=136#gameId=136";
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
MyBibleLines(url->special,20,10,FALSE,FALSE);
}
break;
case 13:
if (DocFormDo(url(CTopMoviesForm *)) && (st=TopMoviesRead(,url->cert*2))) {
StrCpy(url->tag,st);
Free(st);
if (!(st=TopMoviesRead(,url->cert*2+1))||!*st) {
Free(st);
if (DocFormDo(url(CTopMoviesYouTubeForm *)) && *url->special) {
if (url->min || url->sec)
st=MStrPrint("%s&hl=enUS&start=%d",url->special,url->min*60+url->sec);
else
st=StrNew(url->special);
TopMoviesWrite(,url->cert*2+1,st);
} else
st=NULL;
}
"God's response:\n"
"$$TX,\"Top 100 Movies\",HTML=\"http://www.afi.com/100years/movies10.aspx\"$$\n"
"#%s\n",url->tag;
if (st) {
"$$HC,\"<object width=\\\"640\\\" height=\\\"520\\\"><param name=\\\"movie\\\" "
"value=\\\"http://www.youtube.com/v/%s\\\"></param><param "
"name=\\\"allowscriptaccess\\\" value=\\\"always\\\"></param><embed "
"src=\\\"http://www.youtube.com/v/%s\\\" "
"type=\\\"application/x-shockwave-flash\\\" allowscriptaccess=\\\"always\\\" "
"width=\\\"640\\\" height=\\\"520\\\"></embed></object>\"$$\n",st,st;
Free(st);
}
}
break;
}
Free(url);
}
@@ -434,7 +520,7 @@ public U0 GodBooksPassage(U8 *files_find_mask,I64 len=512)
st=FileRead(tempm->full_name);
st2=st+(tempm->user_data+1-len)+i;
st2[len]=0;
"%s\n",st2;
"%s\n\n%s\n",tempm->full_name,st2;
Free(st);
}
}
@@ -442,3 +528,6 @@ public U0 GodBooksPassage(U8 *files_find_mask,I64 len=512)
}
DirTreeDel(tempm1);
}
//GodInit("C:/Home/Wb2/Files/Words/Happy.TXT*");
+63
View File
@@ -0,0 +1,63 @@
//This file has handy functions used to identify which machine
//is which in your personal collection of computers.
Bool IsDrvVMware(U8 drv_let)
{
Bool result=FALSE;
U8 *m=NULL;
try
if ((m=DrvModelNum(drv_let)) &&
!MemCmp(m,"VMware",6))
result=TRUE;
catch
Fs->catch_except=TRUE;
Free(m);
return result;
}
I64 DrvMaxBlk(U8 drv_let)
{
I64 result=0;
CBlkDev *bd;
try {
if (bd=Let2BlkDev(drv_let))
result=bd->max_blk;
} catch
Fs->catch_except=TRUE;
return result;
}
I64 IsDrvATAPI(U8 drv_let)
{
Bool result=FALSE;
CBlkDev *bd;
try if ((bd=Let2BlkDev(drv_let)) &&
bd->type==BDT_ATAPI)
result=TRUE;
catch
Fs->catch_except=TRUE;
return result;
}
Bool ChkDrvModelSerial(U8 drv_let,U8 *model,U8 *serial)
{
Bool result;
U8 *m=NULL,*s=NULL;
try {
m=DrvModelNum(drv_let);
s=DrvSerialNum(drv_let);
} catch {
Free(m); Free(s);
m=NULL; s=NULL;
Fs->catch_except=TRUE;
}
if (m && s && !StrCmp(m,model) && !StrCmp(s,serial))
result=TRUE;
else
result=FALSE;
Free(m); Free(s);
return result;
}
#define CID_DFT 0
I64 tos_cid=CID_DFT;
+301
View File
@@ -0,0 +1,301 @@
#define VIDEO_FRAME_RATE 8
#define FG_JUST_AUDIO 0
#define FG_BOOT_DRV 1
#define FG_RAM_DRV 2
I64 fg_mode=FG_JUST_AUDIO;
Bool fg_on =FALSE;
U0 FrameGrabberTask(I64)
{//ffmpeg -r 8 -i VID%05d.BMP -y Movie.avi
I64 frame_num=0;
U8 buf[136],buf2[136];
F64 end_time=tS;
Silent; //no output to screen
if (fg_mode==FG_RAM_DRV) {
MkDir("B:/Temp/ScreenShots");
while (fg_on) {
StrPrint(buf,"B:/Temp/ScreenShots/VID%05d.BMP",frame_num++);
StrCpy(buf2,buf);
BMPCaptureScreen(buf);
while (TRUE) {
end_time+=1.0/VIDEO_FRAME_RATE;
if (end_time<tS) {
StrPrint(buf,"B:/Temp/ScreenShots/VID%05d.BMP",frame_num++);
Copy(buf2,buf);
} else
break;
}
SleepUntil(cnts.jiffies+(end_time-tS)*JIFFY_FREQ);
}
} else {
MkDir("::/Temp/ScreenShots");
while (fg_on) {
StrPrint(buf,"::/Temp/ScreenShots/VID%05d.BMP.Z",frame_num++);
StrCpy(buf2,buf);
BMPCaptureScreen(buf);
while (TRUE) {
end_time+=1.0/VIDEO_FRAME_RATE;
if (end_time<tS) {
StrPrint(buf,"::/Temp/ScreenShots/VID%05d.BMP.Z",frame_num++);
Copy(buf2,buf);
} else
break;
}
SleepUntil(cnts.jiffies+(end_time-tS)*JIFFY_FREQ);
}
}
}
I64 CopyVideo()
{
I64 result=0;
Del("D:/Temp/*.SND");
if (fg_mode==FG_JUST_AUDIO)
SndFileCreate("D:/Temp/Audio",0.015,0.0,WF_SQUARE,0.45,0.35,2.5);
else {
SndFileCreate("D:/Temp/Audio",0.23,0.0,WF_SQUARE,0.45,0.35);
DelTree("D:/Temp/ScreenShots");
if (fg_mode==FG_RAM_DRV) {
result=CopyTree("B:/Temp/ScreenShots","D:/Temp/ScreenShots");
"Unused Space: %12.6fMeg\n",UnusedDrvSpace('B')/1024.0/1024.0;
} else {
result=CopyTree("::/Temp/ScreenShots","D:/Temp/ScreenShots");
Unzip("D:/Temp/ScreenShots/*.Z");
}
"$$BK,1$$Files Copied:%d$$BK,0$$ Time:%8.3fm\n",result,result/60.0/VIDEO_FRAME_RATE;
}
return result;
}
public U0 FrameGrabberToggle()
{
static F64 last_time=0;
if (tS-last_time>3.0) {
last_time=tS;
if (fg_on) {
fg_on=FALSE;
Snd(0);
wall->record=snd.record=FALSE;
Sleep(1000);
CopyVideo;
} else {
fg_on=TRUE;
if (fg_mode!=FG_JUST_AUDIO)
Spawn(&FrameGrabberTask,NULL,"Frame Grabber");
wall->record=snd.record=TRUE;
Snd(0);
}
}
}
public U0 JukeLines(I64 start_line,I64 end_line)
{
AutoComplete;
if (!fg_on)
FrameGrabberToggle;
JukeSongsPuppet("::/Apps/Psalmody/Examples",,start_line*5,end_line*5);
if (fg_on)
FrameGrabberToggle;
}
public U0 ChkAll()
{
U8 *ptr=TOS_HDS;
while (*ptr)
ChkDsk(*ptr++);
}
public CDoc *DC2Doc(CDC *dc,I64 dx=0,I64 dy=0,I64 *_total_score=NULL)
{
U8 byte_bit_cnts[256];
I64 i,j,*ptr,row,col,ch,best_ch,score,best_score,cur_char_image,diff_image,total_score=0;
CDoc *doc=DocNew;
MemSet(byte_bit_cnts,0,sizeof(byte_bit_cnts));
for (i=0;i<256;i++)
for (j=0;j<7;j++)
if (Bt(&i,j))
byte_bit_cnts[i]++;
for (row=0;row<dc->height/FONT_HEIGHT;row++) {
for (col=0;col<dc->width/FONT_WIDTH;col++) {
cur_char_image=0;
for (i=0;i<FONT_HEIGHT;i++)
for (j=0;j<FONT_WIDTH;j++)
if (GrPeek(dc,col*FONT_WIDTH+j+dx,row*FONT_HEIGHT+i+dy)!=WHITE)
LBts(&cur_char_image,i*8+j);
best_score=MAX_I64;
best_ch=0;
ptr=&text.font[32];
for (ch=32;ch<127;ch++) {
diff_image=*ptr++ ^ cur_char_image;
score=0;
for (i=0;i<8;i++)
score+=byte_bit_cnts[diff_image.u8[i]];
if (score<best_score) {
best_score=score;
best_ch=ch;
}
}
if (best_ch=='$$')
DocPrint(doc,"$$$$");
else
DocPrint(doc,"%c",best_ch);
total_score+=best_score;
}
DocPrint(doc,"\n");
}
if (_total_score) *_total_score=total_score;
return doc;
}
public U0 BMP2TXT(U8 *_in_name,U8 *_out_name=NULL)
{
U8 *in_name,*out_name;
I64 dx,dy,score,best_score=MAX_I64;
CDC *dc;
CDoc *doc;
in_name=DftExt(_in_name,"BMP"),
if (_out_name)
out_name=DftExt(_out_name,"TXT.Z");
else
out_name=ChgExt(_in_name,"TXT.Z");
if (dc=BMPRead(in_name)) {
for (dy=-3;dy<=4;dy++)
for (dx=-3;dx<=4;dx++) {
doc=DC2Doc(dc,dx,dy,&score);
if (score<best_score) {
best_score=score;
StrCpy(&doc->filename.name,out_name);
DocWrite(doc);
}
DocDel(doc);
}
}
Free(in_name);
Free(out_name);
}
U0 DblSpaceScanFile(U8 *filename)
{
CDoc *doc=DocRead(filename);
I64 i;
CDocEntry *doc_e=doc->root.next;
while (doc_e!=doc) {
if (doc_e->type_u8==DOCT_NEW_LINE &&
doc_e->next->type_u8==DOCT_NEW_LINE &&
doc_e->next->next->type_u8==DOCT_NEW_LINE) {
i=0;
while (doc_e->type_u8==DOCT_NEW_LINE) {
i++;
doc_e=doc_e->next;
}
"%02d:",i;
PutFileLink(doc->filename.name,doc_e->y);
'\n';
} else
doc_e=doc_e->next;
}
DocDel(doc);
}
U0 DblSpaceScanLst(CDirEntry *tempde)
{
CDirEntry *tempde1;
while (tempde) {
tempde1=tempde->next;
if (tempde->attr & RS_ATTR_DIR) {
if (tempde->sub) {
"Scanning Directory: %s\n",tempde->full_name;
DblSpaceScanLst(tempde->sub);
}
} else
DblSpaceScanFile(tempde->full_name);
DirEntryDel(tempde);
tempde=tempde1;
}
}
public U0 DblSpaceScan(U8 *files_find_mask="*",U8 *fu_flags=NULL)
{
I64 f=0;
ScanFlags(&f,Define("ST_FILE_UTIL_FLAGS"),"+r+T");
ScanFlags(&f,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
DblSpaceScanLst(FilesFind(files_find_mask,f));
}
AcctRegSetDftEntry("TempleOS/TOS",
"I64 tos_code_walk_thru=1,tos_after_egypt_in_action=1;\n");
AcctRegExeBranch("TempleOS/TOS");
U0 TOSRegInit()
{
DefinePrint("DD_CODE_WALK_THRU","Episode #%d",tos_code_walk_thru);
DefinePrint("DD_AFTER_EGYPT_IN_ACTION","Episode #%d",tos_after_egypt_in_action);
} TOSRegInit;
U0 TOSRegWrite()
{
AcctRegWriteBranch("TempleOS/TOS",
"I64 tos_code_walk_thru=%d,tos_after_egypt_in_action=%d;\n",
tos_code_walk_thru,tos_after_egypt_in_action);
TOSRegInit;
}
class CYouTubeForm2
{
U8 special[136] fmtstr "$$DA-P,135,A=\"SerialNum:%s\"$$\n";
};
U8 *TOSYouTube()
{
U8 *result;
CYouTubeForm2 *url=CAlloc(sizeof(CYouTubeForm2));
if (DocFormDo(url(CYouTubeForm2 *)) && *url->special)
result=MStrPrint("$$HC,\"<object width=\\\"640\\\" height=\\\"520\\\"><param name=\\\"movie\\\" "
"value=\\\"http://www.youtube.com/v/%s\\\"></param><param "
"name=\\\"allowscriptaccess\\\" value=\\\"always\\\"></param><embed "
"src=\\\"http://www.youtube.com/v/%s\\\" "
"type=\\\"application/x-shockwave-flash\\\" allowscriptaccess=\\\"always\\\" "
"width=\\\"640\\\" height=\\\"520\\\"></embed></object>\"$$",
url->special,url->special);
else
result=NULL;
Free(url);
return result;
}
U0 AfterEgyptInAction()
{
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Adam("GodInit(\"/Adam/God/Vocab.TXT*\");");
AutoComplete;
WinMax;
WinBorder;
if (!fg_on)
PopUp("Sleep(50);FrameGrabberToggle;");
Ed("::/Home/Archive/AfterEgypt.TXT.Z");
Msg(MSG_KEY_DOWN_UP,CH_SPACE,0x3900000039); //<SPACE>
ExeFile("::/Apps/AfterEgypt/Run");
SettingsPop;
tos_after_egypt_in_action++;
TOSRegWrite;
}
U0 CodeWalkThru()
{
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
AutoComplete;
WinMax;
WinBorder;
if (!fg_on)
PopUp("Sleep(50);FrameGrabberToggle;");
Ed("::/Home/Archive/RandomCode.TXT.Z");
SettingsPop;
Msg(MSG_KEY_DOWN_UP,'b',0x83000000830); //<ALT-b>
tos_code_walk_thru++;
TOSRegWrite;
}
-490
View File
@@ -1,490 +0,0 @@
Bool IsDrvVMware(U8 drv_let)
{
Bool result=FALSE;
U8 *m=NULL;
try
if ((m=DrvModelNum(drv_let)) &&
!MemCmp(m,"VMware",6))
result=TRUE;
catch
Fs->catch_except=TRUE;
Free(m);
return result;
}
I64 DrvMaxBlk(U8 drv_let)
{
I64 result=0;
CBlkDev *bdev;
try {
if (bdev=Drv2BlkDev(drv_let))
result=bdev->max_blk;
} catch
Fs->catch_except=TRUE;
return result;
}
I64 IsDrvATAPI(U8 drv_let)
{
Bool result=FALSE;
CBlkDev *bdev;
try if ((bdev=Drv2BlkDev(drv_let)) &&
bdev->type==BDT_ATAPI)
result=TRUE;
catch
Fs->catch_except=TRUE;
return result;
}
Bool ChkDrvModelSerial(U8 drv_let,U8 *model,U8 *serial)
{
Bool result;
U8 *m=NULL,*s=NULL;
try {
m=DrvModelNum(drv_let);
s=DrvSerialNum(drv_let);
} catch {
Free(m); Free(s);
m=NULL; s=NULL;
Fs->catch_except=TRUE;
}
if (m && s && !StrCmp(m,model) && !StrCmp(s,serial))
result=TRUE;
else
result=FALSE;
Free(m); Free(s);
return result;
}
#define SLOP BLK_SIZE
U0 TSBootRescueDrv1()
{
CBinFile *bfh=sys_boot_base-sizeof(CBinFile);
bfh(I64)+=bfh->file_size-1;
DefinePrint("TS_BOOT_RESCUE_DRV_START","0x%X",CeilI64(SYS_KERNEL_END+SLOP,BLK_SIZE));
DefinePrint("TS_BOOT_RESCUE_DRV_END", "0x%X",FloorI64(
(BOOT_RAM_LIMIT-(BOOT_STK_SIZE+CD_BOOT_LOADER_SIZE))>>4<<4-
(bfh(I64)-SYS_KERNEL_END)-SLOP,BLK_SIZE));
DefinePrint("CFG_BOOT_RESCUE_DRV_FILE","\"/Temp/BootRescueDrv.BIN.Z\"");
} TSBootRescueDrv1;
U0 TSBootRescueDrv2()
{
DefinePrint("CFG_BOOT_RESCUE_DRV","\"a10x%X\n0x%X\n\"",TS_BOOT_RESCUE_DRV_START,
(TS_BOOT_RESCUE_DRV_END-TS_BOOT_RESCUE_DRV_START)/BLK_SIZE);
DefinePrint("CFG_BOOT_RESCUE_DRV_START","\"0x%X\"",TS_BOOT_RESCUE_DRV_START);
} TSBootRescueDrv2;
U0 TSEmployeeSet()
{
U8 *st=StrNew(sys_acct),*st2=MAllocIdentical(st);
StrLastRem(st,"/",st2);
Free(st);
DefinePrint("TS_EMPLOYEE","\"%s\"",st2);
Free(st2);
} TSEmployeeSet;
U0 TSBlogDirSet()
{
CDateStruct ds;
Date2Struct(&ds,Now+local_time_offset);
DefinePrint("TS_BLOG_DIR","\"/Accts/TS/Wb2/Rants/%s/%04d/%02d\"",
TS_EMPLOYEE,ds.year,ds.mon);
} TSBlogDirSet;
#define CID_DFT 0
#define CID_TAD8 1 //This was my old machine but it died. Booted natively
#define CID_TAD8_VM 2 //It could run booted with physical drive in VMware
//My current machine is TAD9 but it only runs in VMware, so it's CID_DFT
I64 ts_cid=CID_DFT;
U0 TSIDComputer()
{
/* My TAD8 computer died. It had two hard drives. You could
boot it directly or from VMware with a physical drive.
CMemE820 *m20=SYS_MEM_E820;
if (IsDrvVMware('D') && DrvMaxBlk('D')==0x575466EF)
ts_cid=CID_TAD8_VM; //VMware boot of TAD8
else if (ChkDrvModelSerial('D',"Hitachi HDS721075KLA330","GTF202P8H509AF") &&
ChkDrvModelSerial('I',"ST3320620AS","6QF24J0A"))
ts_cid=CID_TAD8; //Regular boot of TAD8
//beware 'S'
else if (*sys_acct=='T' && IsDrvATAPI('T') && m20[11].base==0x100000000 &&
m20[11].base(I64)+m20[11].len-1==0x33FFFFFFF)
ts_cid=CID_TAD8; //CDROM boot of TAD8
*/
} TSIDComputer;
U0 TSInit()
{
CATARep *root=NULL,*ata_drv=NULL,*atapi_drv=NULL;
CBlkDev *bdev;
switch (ts_cid) {
/* This machine died, but you can use it as an example.
case CID_TAD8:
case CID_TAD8_VM:
DefinePrint("CFG_ACCT","\"\nTS/TAD\n\"");
DefinePrint("CFG_HARD_DRVS","\"h2s0xbc00\n0xb880\n1d2s0xbc00\n0xb880\n0\"");
DefinePrint("CFG_RAM_DRVS","\"b1\nScale2Mem(2048,0x40000)\n\"");
DefinePrint("CFG_CDROM_DRVS","\"t3s0xb800\n0\"");
DefinePrint("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
if (ts_cid==CID_TAD8) {
DefinePrint("TS_HDS","\"DEI\"");
DefinePrint("TS_MASTER_BOOT_DRVS","\"I\"");
} else {//CID_TAD8_VM
DefinePrint("TS_HDS","\"DE\"");
DefinePrint("TS_MASTER_BOOT_DRVS","\"\"");
}
DefinePrint("TS_MAIN_DRV","\"D\"");
DefinePrint("TS_BAK_DRV","\"E\"");
DefinePrint("TS_RAM_DRV","\"B\"");
DefinePrint("TS_WIN_DRV","\"H\"");
DefinePrint("TS_CDROM_DRV","\"T\"");
break;
*/
case CID_DFT:
DefinePrint("CFG_ACCT","\"\nTS/TAD\n\"");
DefinePrint("CFG_RAM_DRVS","\"b1\nScale2Mem(2048,0x40000)\n\"");
if (dsk.auto_mount_ide_cnt) {
//If AutoMount was successful, No need to manually mount in next compile
DefinePrint("CFG_HARD_DRVS","\"\"");
DefinePrint("CFG_CDROM_DRVS","\"\"");
} else {
//These two are a crazy guess. ATA:IDE Primary ATAPI:IDE Secondary
DefinePrint("CFG_HARD_DRVS","\"d2s0x1F0\n0x3F4\n0\"");
DefinePrint("CFG_CDROM_DRVS","\"t3s0x170\n0\"");
bdev=Drv2BlkDev(*sys_acct);
if (bdev->type==BDT_ATAPI) {
ATARep(FALSE,,&root);
ATAIDDrvs(root,*sys_acct,&ata_drv,&atapi_drv);
if (ata_drv)
DefinePrint("CFG_HARD_DRVS","\"d2p%d\n\"",ata_drv->num);
if (atapi_drv)
DefinePrint("CFG_CDROM_DRVS","\"t3p%d\n\"",atapi_drv->num);
} else {
try {
bdev=Drv2BlkDev('D');
DefinePrint("CFG_HARD_DRVS","\"d2s0x%X\n0x%X\n%d\"",
bdev->base0,bdev->base1,bdev->unit);
} catch
Fs->catch_except=TRUE;
try {
bdev=Drv2BlkDev('T');
DefinePrint("CFG_CDROM_DRVS","\"t3s0x%X\n%d\"",bdev->base0,bdev->unit);
} catch
Fs->catch_except=TRUE;
}
}
DefinePrint("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
DefinePrint("TS_HDS","\"DE\"");
DefinePrint("TS_MASTER_BOOT_DRVS","\"D\"");
DefinePrint("TS_MAIN_DRV","\"D\"");
DefinePrint("TS_BAK_DRV","\"E\"");
DefinePrint("TS_BOOT_RESCUE_DRV","\"A\"");
DefinePrint("TS_RAM_DRV","\"B\"");
DefinePrint("TS_WIN_DRV","\"\"");
DefinePrint("TS_CDROM_DRV","\"T\"");
}
} TSInit;
U0 TSInit2()
{
DefinePrint("TS_MAIN_DRV_LET","'%s'",TS_MAIN_DRV);
DefinePrint("TS_BAK_DRV_LET","'%s'",TS_BAK_DRV);
DefinePrint("TS_BOOT_RESCUE_DRV_LET","'%s'",TS_BOOT_RESCUE_DRV);
DefinePrint("TS_RAM_DRV_LET","'%s'",TS_RAM_DRV);
DefinePrint("TS_WIN_DRV_LET","'%s'",TS_WIN_DRV);
DefinePrint("TS_CDROM_DRV_LET","'%s'",TS_CDROM_DRV);
} TSInit2;
Bool ts_has_main_drv =ToBool(StrLen(TS_MAIN_DRV)),
ts_has_bak_drv =ToBool(StrLen(TS_BAK_DRV)),
ts_has_boot_rescue_drv =ToBool(StrLen(TS_BOOT_RESCUE_DRV)),
ts_has_ram_drv =ToBool(StrLen(TS_RAM_DRV)),
ts_has_win_drv =ToBool(StrLen(TS_WIN_DRV)),
ts_has_cdrom_drv=ToBool(StrLen(TS_CDROM_DRV));
if (ts_has_main_drv)
SetDrvTextAttr(TS_MAIN_DRV_LET, WHITE <<4|BLUE);
if (ts_has_bak_drv)
SetDrvTextAttr(TS_BAK_DRV_LET, WHITE <<4|RED);
if (ts_has_boot_rescue_drv)
SetDrvTextAttr(TS_BOOT_RESCUE_DRV_LET, BLUE <<4|BROWN);
if (ts_has_ram_drv)
SetDrvTextAttr(TS_RAM_DRV_LET, BLUE <<4|YELLOW);
if (ts_has_win_drv)
SetDrvTextAttr(TS_WIN_DRV_LET, LTRED <<4|BLACK);
if (ts_has_cdrom_drv)
SetDrvTextAttr(TS_CDROM_DRV_LET,LTGRAY<<4|BLUE);
#define TS_ISO_NAME TS_RAM_DRV ":/TempleOSCD.ISO"
#define TS_DISTRO_DIR TS_RAM_DRV ":/Distro"
#define CFG_OPTS "AutoMountIDE\nDT\n"
#define CFG_DBG_OPTS "AutoMountIDE\nDT"\
"HeapInit\n130\nMemInit\n131\nVarInit\n132\n\n"
#define CFG_DBGZ_OPTS "AutoMountIDE\nDT"\
"HeapInit\n0\nMemInit\n0\nVarInit\n0\n\n"
#define TS_CFG "\n" CFG_RAM_DRVS CFG_CDROM_DRVS CFG_HARD_DRVS CFG_ACCT CFG_DSK_CACHE CFG_OPTS
#define TS_MENU_CFG "\n" CFG_RAM_DRVS CFG_CDROM_DRVS CFG_HARD_DRVS "\n\n" CFG_DSK_CACHE CFG_OPTS
#define TS_CDROM_CFG "Tb1\n0x20000\nt3 \n\nTS\n\nAutoMountIDE\nDT\n"
#define TS_CDROM_DBG_CFG "A" CFG_BOOT_RESCUE_DRV "b1\nScale2Mem(2048,0x40000)\n\n\n\n"\
"DontProbe\nBootRescueDrv\n" TS_MAIN_DRV ":" CFG_BOOT_RESCUE_DRV_FILE "\n" CFG_BOOT_RESCUE_DRV_START "\n\n"
//$BK,1$Change these, too...$BK,0$
//$MA-X+PU,"STD_DISTRO_CDROM_CFG",LM="F(\"STD_DISTRO_CDROM_CFG\");View;"$
//$LK,"Install Acct",A="FF:::/Accts/Install/DoOnce.CPP,MakeOSPrtBootInstall"$
Bool frame_grabber_on=FALSE;
#define VIDEO_FRAME_RATE 8
U0 FrameGrabberTask(I64)
{/**** TO MAKE MOVIE ****
TempleOS
<ALT-SHIFT-V>
[Do stuff you want recorded]
<ALT-SHIFT-V>
Boot Windows
Copy /Temp
Download "ffmpeg" from the Internet
>CD SCREENSHOTS
>TSZ .
>ffmpeg -r 8 -i VID%05d.BMP -y Movie.avi
*/
I64 frame_num=0;
U8 buf[136],buf2[136];
F64 end_time=tS;
Silent(ON); //no output to screen
MkDir("::/Temp/ScreenShots");
while (frame_grabber_on) {
StrPrint(buf,"::/Temp/ScreenShots/VID%05d.BMP.Z",frame_num++);
StrCpy(buf2,buf);
BMPFileCaptureScreen(buf);
while (TRUE) {
end_time+=1.0/VIDEO_FRAME_RATE;
if (end_time<tS) {
StrPrint(buf,"::/Temp/ScreenShots/VID%05d.BMP.Z",frame_num++);
Copy(buf2,buf);
} else
break;
}
SleepUntil(cnts.jiffies+(end_time-tS)*JIFFY_FREQ);
}
}
I64 CopyVideo()
{
I64 result=0;
if (ts_has_bak_drv) {
Del(TS_BAK_DRV ":/Temp/*.SND");
SndFileCreate(TS_BAK_DRV ":/Temp/Audio",0.23,0.0,WF_SQUARE,0.45,0.35);
DelTree(TS_BAK_DRV ":/Temp/ScreenShots");
CopyTree("::/Temp/ScreenShots",TS_BAK_DRV ":/Temp/ScreenShots");
result=Unzip(TS_BAK_DRV ":/Temp/ScreenShots/*.Z");
}
"$$BK,1$$Files Copied:%d$$BK,0$$ Time:%8.3fm\n",result,result/60.0/VIDEO_FRAME_RATE;
return result;
}
public U0 FrameGrabberToggle()
{
static F64 last_time=0;
if (tS-last_time>3.0) {
last_time=tS;
if (frame_grabber_on) {
frame_grabber_on=FALSE;
Snd(0);
wall->record=snd.record=FALSE;
Sleep(1000);
CopyVideo;
} else {
frame_grabber_on=TRUE;
Spawn(&FrameGrabberTask,NULL,"Frame Grabber");
wall->record=snd.record=TRUE;
Snd(0);
}
}
}
U0 JukeSongsPut(U8 *dir,I64 start_song,I64 end_song)
{
I64 i,j,len=4;
CDirEntry *tempde,*tempde1;
Cd(dir);
tempde1=FilesFind("*",FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES);
for (tempde=tempde1,i=0;tempde && i<start_song;i++)
tempde=tempde->next;
for (i=start_song;tempde && i<end_song;i++) {
if (FileExtDot(tempde->name))
FileExtRem(tempde->name);
if (j=StrLen(tempde->name)) {
*tempde->full_name=':';
*tempde->name=ToUpper(*tempde->name);
if (j>len) len=j;
}
tempde=tempde->next;
}
for (tempde=tempde1,i=0;tempde && i<start_song;i++)
tempde=tempde->next;
if (end_song-start_song<=9)
j=1;
else if (end_song-start_song<=99)
j=2;
else
j=3;
for (i=start_song;tempde && i<end_song;i++) {
"$$LK+CX,\"%*d) %-*s\",A=\"FI:%s\"$$\n",j,i-start_song+1,len,tempde->name,tempde->full_name;
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
public U0 JukeLines(I64 start_line,I64 end_line)
{
WordStat;
if (!frame_grabber_on)
FrameGrabberToggle;
JukeSongsPuppet("::/Apps/Psalmody/Examples",,start_line*5,end_line*5);
if (frame_grabber_on)
FrameGrabberToggle;
JukeSongsPut("::/Apps/Psalmody/Examples",start_line*5,end_line*5);
}
public U0 ChkAll()
{
U8 *ptr=TS_HDS;
while (*ptr)
ChkDsk(*ptr++);
}
public CDoc *DC2Doc(CDC *dc,I64 dx=0,I64 dy=0,I64 *_total_score=NULL)
{
U8 byte_bit_cnts[256];
I64 i,j,*ptr,row,col,ch,best_ch,score,best_score,cur_char_image,diff_image,total_score=0;
CDoc *doc=DocNew;
MemSet(byte_bit_cnts,0,sizeof(byte_bit_cnts));
for (i=0;i<256;i++)
for (j=0;j<7;j++)
if (Bt(&i,j))
byte_bit_cnts[i]++;
for (row=0;row<dc->height/FONT_HEIGHT;row++) {
for (col=0;col<dc->width/FONT_WIDTH;col++) {
cur_char_image=0;
for (i=0;i<FONT_HEIGHT;i++)
for (j=0;j<FONT_WIDTH;j++)
if (GrPeek(dc,col*FONT_WIDTH+j+dx,row*FONT_HEIGHT+i+dy)!=WHITE)
LBts(&cur_char_image,i*8+j);
best_score=MAX_I64;
best_ch=0;
ptr=&text.font[32*FONT_HEIGHT];
for (ch=32;ch<127;ch++) {
diff_image=*ptr++ ^ cur_char_image;
score=0;
for (i=0;i<8;i++)
score+=byte_bit_cnts[diff_image.u8[i]];
if (score<best_score) {
best_score=score;
best_ch=ch;
}
}
if (best_ch=='$$')
DocPrint(doc,"$$$$");
else
DocPrint(doc,"%c",best_ch);
total_score+=best_score;
}
DocPrint(doc,"\n");
}
if (_total_score) *_total_score=total_score;
return doc;
}
public U0 BMP2TXT(U8 *_in_name,U8 *_out_name=NULL)
{
U8 *in_name,*out_name;
I64 dx,dy,score,best_score=MAX_I64;
CDC *dc;
CDoc *doc;
in_name=DftExt(_in_name,"BMP"),
if (_out_name)
out_name=DftExt(_out_name,"TXT.Z");
else
out_name=ChgExt(_in_name,"TXT.Z");
if (dc=BMPFileRead(in_name)) {
for (dy=-3;dy<=4;dy++)
for (dx=-3;dx<=4;dx++) {
doc=DC2Doc(dc,dx,dy,&score);
if (score<best_score) {
best_score=score;
StrCpy(&doc->filename.name,out_name);
DocWrite(doc);
}
DocDel(doc);
}
}
Free(in_name);
Free(out_name);
}
U0 DblSpaceScanFile(U8 *filename)
{
CDoc *doc=DocRead(filename);
I64 i;
CDocEntry *doc_e=doc->root.next;
while (doc_e!=doc) {
if (doc_e->type_u8==DOCT_NEW_LINE &&
doc_e->next->type_u8==DOCT_NEW_LINE &&
doc_e->next->next->type_u8==DOCT_NEW_LINE) {
i=0;
while (doc_e->type_u8==DOCT_NEW_LINE) {
i++;
doc_e=doc_e->next;
}
"%02d:",i;
PutFileLink(doc->filename.name,doc_e->y);
'\n';
} else
doc_e=doc_e->next;
}
DocDel(doc);
}
U0 DblSpaceScanLst(CDirEntry *tempde)
{
CDirEntry *tempde1;
while (tempde) {
tempde1=tempde->next;
if (tempde->attr & RS_ATTR_DIR) {
if (tempde->sub) {
"Scanning Directory: %s\n",tempde->full_name;
DblSpaceScanLst(tempde->sub);
}
} else
DblSpaceScanFile(tempde->full_name);
DirEntryDel(tempde);
tempde=tempde1;
}
}
public U0 DblSpaceScan(U8 *files_find_mask="*",U8 *fu_flags=NULL)
{
I64 f=0;
ScanFlags(&f,Define("ST_FILE_UTIL_FLAGS"),"+r+T");
ScanFlags(&f,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
DblSpaceScanLst(FilesFind(files_find_mask,f));
}
-624
View File
@@ -1,624 +0,0 @@
//The CFG defines are $LK,"Here",A="FI:::/Demo/AcctExample/TSAdam.CPP"$.
U8 TSGetDrv()
{
I64 result;
"Drive (%s):",TS_HDS;
result=ToUpper(GetChar);
'\n';
return result;
}
U0 TSMakeOSPrtBootInstall(U8 drv_let)
{
drv_let=ToUpper(drv_let);
Auto(TS_CFG);
MakeOSPrtBootInstall(drv_let);
if (StrOcc(TS_MASTER_BOOT_DRVS,drv_let))
MasterBootIntall(drv_let);
}
U0 SoftBootMenu(U8 drv_let=0)
{
if (!drv_let)
drv_let=Prt2Drv(Fs->cur_prt);
Drv(drv_let);
Cd("/Kernel");
Auto(TS_MENU_CFG);
if (!Cmp("Kernel","Kernel",NULL,':'))
SoftBoot("Kernel.BIN.Z");
}
U0 TSCopyDrv(U8 src,U8 dst)
{
U8 buf_s[128],buf_d[128];
src=ToUpper(src);
dst=ToUpper(dst);
Fmt(dst,,FALSE,PT_FAT32);
StrPrint(buf_s,"%c:/",src);
StrPrint(buf_d,"%c:/",dst);
CopyTree(buf_s,buf_d);
DocClear;
Drv(dst);
TSMakeOSPrtBootInstall(dst);
}
U0 TSPromptAndCopyDrv()
{
I64 src,dst;
"$$RED$$\nCopy Src Drive:\n$$FG$$";
src=TSGetDrv;
"$$RED$$\nCopy Dst Drive:\n$$FG$$";
dst=TSGetDrv;
TSCopyDrv(src,dst);
}
public U0 CursorRemFile(U8 *filename)
{
CDoc *doc;
doc=DocRead(filename,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
DocWrite(doc);
DocDel(doc);
}
public U0 CursorRem(U8 *files_find_mask="*")
{
I64 fuf_flags=0;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+T+f+F+O");
CDirEntry *tempde=FilesFind(files_find_mask,fuf_flags),*tempde1=tempde;
while (tempde) {
CursorRemFile(tempde->full_name);
Touch(tempde->full_name,"",,tempde->datetime);
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
U0 UncollapseFile(U8 *filename,I64 *)
{
CDoc *doc=DocRead(filename,DOCF_NO_CURSOR);
DocCollapse(FALSE,doc);
DocWrite(doc);
DocDel(doc);
}
U0 Uncollapse(U8 *files_find_mask="*",U8 *fu_flags=NULL)
{
I64 fuf_flags=0;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+f+F+T+O");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
CDirEntry *tempde=FilesFind(files_find_mask,fuf_flags),*tempde1=tempde;
while (tempde && !Bt(&fuf_flags,FUf_CANCEL)) {
UncollapseFile(tempde->full_name,&fuf_flags);
Touch(tempde->full_name,"",,tempde->datetime);
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
public U0 CopySongs(U8 threshold='7')
{
CDoc *s;
CDocEntry *doc_e;
CDirEntry *tempde=FilesFind("/Accts/TS/TAD/Psalmody/*.CPP*",FUF_CLUSTER_ORDER),*tempde1=tempde;
DelTree("/Apps/Psalmody/Examples");
MkDir("/Apps/Psalmody/Examples");
while (tempde) {
s=DocRead(tempde->full_name);
doc_e=s->root.next;
if (doc_e->type_u8==DOCT_TEXT && doc_e->tag[2]>=threshold)
Copy(tempde->full_name,"/Apps/Psalmody/Examples");
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
U0 DistroPrep()
{
Del("/Demo/WebLogExample/WebLogRep.TXT*");
Del("/Demo/ReverseFileExample/PoemForeward.TXT*");
Del("/Demo/Games/EagleDive.BIN*");
DelTree("/Accts/*Temp.TXT.Z");
CopySongs;
DelTree("/Temp");
MkDir("/Temp");
MkDir("/Temp/ScreenShots");
//User
Del("/Accts/User/Registry.CPP.Z");
//Install
Del("/Accts/Install/Registry.CPP.Z");
Touch("/Accts/PersonalMenu.TXT.Z","+T");
//TS
Touch("/Accts/TS/PersonalMenu.TXT.Z","+T");
DelTree("/Demo/AcctExample");
CopyTree("/Accts/TS","/Demo/AcctExample");
DelTree("/Demo/AcctExample/TAD/Psalmody");
DelTree("/Demo/AcctExample/Wb2");
DelTree("/Demo/AcctExample/TAD");
//Once in a while, do these:
// TSSortHeaders;
// DocOpt("/*");
// DblSpaceScan("/*");
CursorRem("/*");
DelTree("/Demo/*.BI*");
S2T("/*","+r+S");
DocOpt("/*");
Move(WSD_DEF_FILENAME,WSD_DEF_FILENAME_Z);
}
U0 MakeBootRescueDrvFile()
{
try
PrtChk(Drv2Prt(TS_BOOT_RESCUE_DRV_LET));
catch {
Fs->catch_except=TRUE;
Auto(CFG_BOOT_RESCUE_DRV "\n");
Mount;
}
CBlkDev *bdev=Drv2BlkDev(TS_BOOT_RESCUE_DRV_LET);
Fmt(TS_BOOT_RESCUE_DRV_LET,,FALSE,PT_REDSEA);
MkDir(TS_BOOT_RESCUE_DRV ":/Compiler");
Copy(TS_MAIN_DRV ":/Compiler/Compiler.BIN.Z", TS_BOOT_RESCUE_DRV ":/Compiler");
Copy(TS_MAIN_DRV ":/Compiler/OpCodes.TXT.Z", TS_BOOT_RESCUE_DRV ":/Compiler");
Copy(TS_MAIN_DRV ":/Compiler/CmpDefs.HPP.Z", TS_BOOT_RESCUE_DRV ":/Compiler");
Copy(TS_MAIN_DRV ":/Compiler/Cmp.HPP.Z", TS_BOOT_RESCUE_DRV ":/Compiler");
MkDir(TS_BOOT_RESCUE_DRV ":/Kernel");
Copy(TS_MAIN_DRV ":/Kernel/*.HPP*", TS_BOOT_RESCUE_DRV ":/Kernel");
Copy(TS_MAIN_DRV ":/Kernel/Adam1*", TS_BOOT_RESCUE_DRV ":/Kernel");
CopyTree(TS_MAIN_DRV ":/Kernel/Dsk", TS_BOOT_RESCUE_DRV ":/Kernel/Dsk");
MkDir(TS_BOOT_RESCUE_DRV ":/Adam");
Copy(TS_MAIN_DRV ":/Accts/TS/DbgAdam2.CPP.Z", TS_BOOT_RESCUE_DRV ":/Adam/Adam2.CPP.Z");
Copy(TS_MAIN_DRV ":/Adam/AdamExts.HPP.Z", TS_BOOT_RESCUE_DRV ":/Adam");
Copy(TS_MAIN_DRV ":/Adam/Math2a.CPP.Z", TS_BOOT_RESCUE_DRV ":/Adam");
Copy(TS_MAIN_DRV ":/Adam/Training.CPP.Z", TS_BOOT_RESCUE_DRV ":/Adam");
Copy(TS_MAIN_DRV ":/Adam/Utils2a.CPP.Z", TS_BOOT_RESCUE_DRV ":/Adam");
Copy(TS_MAIN_DRV ":/Adam/MathODE.CPP.Z", TS_BOOT_RESCUE_DRV ":/Adam");
FileWrite(TS_MAIN_DRV ":" CFG_BOOT_RESCUE_DRV_FILE,bdev->RAM_dsk,(bdev->max_blk+1)<<BLK_SIZE_BITS);
}
U0 MakeSymFiles()
{
CDoc *doc;
U8 *st;
if (ts_has_bak_drv) {
DocClear;
DocMax;
HashTablePurge(adam_task->hash_table);
Who;
if (doc=DocPut) {
st=StrNew(doc->filename.name);
StrCpy(doc->filename.name,TS_BAK_DRV ":/Wb/Accts/TS/Wb2/SymsAlpha.TXT.Z");
DocWrite(doc);
StrCpy(doc->filename.name,st);
Free(st);
}
DocClear;
DocMax;
Who("+m");
if (doc=DocPut) {
st=StrNew(doc->filename.name);
StrCpy(doc->filename.name,TS_BAK_DRV ":/Wb/Accts/TS/Wb2/SymsAddress.TXT.Z");
DocWrite(doc);
StrCpy(doc->filename.name,st);
Free(st);
}
DocClear;
}
}
I64 MakeLineRepFile()
{
U8 *st;
CDoc *doc;
I64 result,official;
CDocEntry *tree_branch,*start_indent,*end_indent;
DocClear;
Drv(TS_MAIN_DRV_LET);
DistroPrep;
Cd(TS_MAIN_DRV ":/");
if (ts_has_ram_drv) {
DelTree(TS_RAM_DRV ":/TS");
CopyTree(TS_MAIN_DRV ":/Accts/TS",TS_RAM_DRV ":/TS");
DelTree(TS_MAIN_DRV ":/Accts/TS");
}
DocMax;
DocClear;
result=LineRep;
if (doc=DocPut) {
st=StrNew(doc->filename.name);
StrCpy(doc->filename.name,TS_RAM_DRV ":/TS/Wb2/LineRep.TXT.Z");
DocWrite(doc);
StrCpy(doc->filename.name,st);
Free(st);
}
DocClear;
official=LineRep(TS_MAIN_DRV ":/Accts/*")+
LineRep(TS_MAIN_DRV ":/Adam/*")+
LineRep(TS_MAIN_DRV ":/Compiler/*","-S+T")+
LineRep(TS_MAIN_DRV ":/Kernel/*");
DocClear;
if (ts_has_ram_drv) {
CopyTree(TS_RAM_DRV ":/TS",TS_MAIN_DRV ":/Accts/TS");
DelTree(TS_RAM_DRV ":/TS");
}
doc=DocRead(TS_MAIN_DRV ":/Adam/DocDefines.CPP.Z");
DocTreeFind(doc,"LineRep",&tree_branch,&start_indent,&end_indent);
DocCut(doc,start_indent->next,end_indent->last);
doc->cur_entry=start_indent->next;
doc->cur_data_col=0;
DocPrint(doc,"DefinePrint(\"DD_TEMPLEOS_LOC\",\"%,d\");\n",result);
DocPrint(doc,"DefinePrint(\"DD_TEMPLEOS_LOC_OFFICIAL\",\"%,d\");\n",official);
st=MStrPrint("%,d",result);
DefineLoad("DD_TEMPLEOS_LOC",st);
Free(st);
st=MStrPrint("%,d",official);
DefineLoad("DD_TEMPLEOS_LOC_OFFICIAL",st);
Free(st);
DocWrite(doc);
DocDel(doc);
"Total LOC:%12,d\n\n",result;
return result;
}
U0 TSDistroPrep()
{/*This is the Trivial Solution internal company distro. Only run this on a
virtual machine, not bare metal hardware because it's settings could cause
problems. The hard drive must be partitioned. Install Std Distro, then
install this on top.
>$LK,"TSInstall",A="FF:::/Demo/AcctExample/TSDistro.CPP,TSInstall"$;
>$LK,"TSUpgrade",A="FF:::/Demo/AcctExample/TSDistro.CPP,TSUpgrade"$;
See $LK,"MakeDistrosAndBackUp",A="FF:::/Demo/AcctExample/TSDistro.CPP,MakeDistrosAndBackUp"$() to reproduce the ISO's in $FG,4$E:/Wb$FG$. It makes this
website, too.
*/
Drv(TS_MAIN_DRV_LET);
DistroPrep;
Auto(TS_CDROM_CFG);
MakeOSPrtBootInstall(TS_MAIN_DRV_LET,TS_CDROM_DRV_LET);
DelTree(TS_DISTRO_DIR);
CopyTree(TS_MAIN_DRV ":/",TS_DISTRO_DIR "/");
}
U0 MakeTSDistro()
{
TSDistroPrep;
CDFileCreate(TS_ISO_NAME,TS_DISTRO_DIR "/*",,TS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
DefinePrint("DD_TEMPLEOSTS_SIZE",
"Download $TX,"TempleOS V2.10",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",
0.1*(10*Size(TS_ISO_NAME,"+s")/1024/1024));
Drv(TS_MAIN_DRV_LET);
}
U0 DbgDistroPrep()
{/*This is a debug distro. The CDROM bootloader uses BIOS INT 0x13 0x42 to
load Kernel.BIN.C which has been modified to also hold a small RAM drive
(Drive A) that fits in the low 640k. The bootloader starts in real mode
and the kernel changes to long, 64-bit mode. It loads the 64-bit compiler
and assembler, compiles some, but not all, of the normal start-up scripts
and drops you off at the $LK,"Dbg",A="MN:Dbg"$ command-line where you can JIT compile,
use $LK,"EdLite",A="MN:EdLite"$ on RAM files, and use many of the other normal Kernel commands.
I could not fit all the normal start-up scripts into the small RAM drive,
so you do not have the window manager or normal document framework. You
should have many Gig of RAM to play with with RAM Drive B, a high memory
RAM drive, but you have only those few files. When I generate this distro,
I call $LK,"MakeBootDrvFile",A="FF:::/Demo/AcctExample/TSDistro.CPP,MakeBootRescueDrvFile"$.
*/
if (ts_has_boot_rescue_drv) {
Drv(TS_MAIN_DRV_LET);
DistroPrep;
MakeBootRescueDrvFile;
Auto(TS_CDROM_DBG_CFG);
MakeOSPrtBootInstall(TS_MAIN_DRV_LET,TS_CDROM_DRV_LET);
DelTree(TS_DISTRO_DIR);
CopyTree(TS_MAIN_DRV ":/",TS_DISTRO_DIR "/");
Del(TS_MAIN_DRV ":" CFG_BOOT_RESCUE_DRV_FILE);
}
}
U0 MakeDbgDistro()
{
DbgDistroPrep;
CDFileCreate(TS_ISO_NAME,TS_DISTRO_DIR "/*",,TS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
DefinePrint("DD_TEMPLEOSDBG_SIZE",
"Download $TX,"TempleOS V2.10",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1f MB)",
0.1*(10*Size(TS_ISO_NAME,"+s")/1024/1024));
Drv(TS_MAIN_DRV_LET);
}
U0 StdDistroPrep()
{
Drv(TS_MAIN_DRV_LET);
DistroPrep;
Auto(STD_DISTRO_CDROM_CFG);
MakeOSPrtBootInstall(TS_MAIN_DRV_LET,TS_CDROM_DRV_LET);
DelTree(TS_DISTRO_DIR);
CopyTree(TS_MAIN_DRV ":/",TS_DISTRO_DIR "/");
DelTree(TS_DISTRO_DIR "/Accts/TS");
Del(TS_DISTRO_DIR "/0000Boot/OldMBR.BIN.C");
Del(TS_DISTRO_DIR "/0000Boot/BootMHD2.BIN.C");
}
U0 MakeStdDistro()
{
StdDistroPrep;
CDFileCreate(TS_ISO_NAME,TS_DISTRO_DIR "/*",,TS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
Drv(TS_MAIN_DRV_LET);
}
U0 LiteDistroPrep()
{/*Missing: Dictionary, Bible and TSZ Utility. Still 100% OpenSource.
Includes: x86_64 64BitMultiCoredKernel, 64BitCompiler, Assembler,
Unassembler, Debugger, Editor, VGAGraphics, Tools, BootLoaders,
Keyboard&Mouse, HardDrives, FAT32, Partitioner, CD/DVD, ISO9660FileCreator,
FileManager, WindowManager, PCSpeaker, Apps, Games, God-Oracle-App, Hymns,
Demos, Documentation.
*/
Drv(TS_MAIN_DRV_LET);
DistroPrep;
Auto(STD_DISTRO_CDROM_CFG);
MakeOSPrtBootInstall(TS_MAIN_DRV_LET,TS_CDROM_DRV_LET);
DelTree(TS_DISTRO_DIR);
CopyTree(TS_MAIN_DRV ":/",TS_DISTRO_DIR "/");
DelTree(TS_DISTRO_DIR "/Accts/TS");
DelTree(TS_DISTRO_DIR "/Linux");
DelTree(TS_DISTRO_DIR "/Windows");
Del(TS_DISTRO_DIR "/0000Boot/OldMBR.BIN.C");
Del(TS_DISTRO_DIR "/0000Boot/BootMHD2.BIN.C");
Del(TS_DISTRO_DIR "/Adam/WordStat/WSDefs.DAT*");
Del(TS_DISTRO_DIR "/Misc/PCIDevices.TXT.Z");
Del(TS_DISTRO_DIR "/Misc/Bible.TXT.Z");
}
U0 MakeLiteDistro()
{
LiteDistroPrep;
CDFileCreate(TS_ISO_NAME,TS_DISTRO_DIR "/*",,TS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
DefinePrint("DD_TEMPLEOSLITE_SIZE",
"Download $TX,"TempleOS V2.10",D="DD_OS_NAME_VERSION"$ - Lite Distro (%0.1f MB)",
0.1*(10*Size(TS_ISO_NAME,"+s")/1024/1024));
Drv(TS_MAIN_DRV_LET);
}
U0 UltraDistroPrep()
{/*Missing: Apps, Demos, Dictionary, Bible and TSZ Utility. Still 100% OpenSource.
Includes: x86_64 64BitMultiCoredKernel, 64BitCompiler, Assembler,
Unassembler, Debugger, Editor, VGAGraphics, Tools, BootLoaders,
Keyboard&Mouse, HardDrives, FAT32, Partitioner, CD/DVD, ISO9660FileCreator,
FileManager, WindowManager, PCSpeaker, Documentation.
*/
Drv(TS_MAIN_DRV_LET);
DistroPrep;
Auto(STD_DISTRO_CDROM_CFG);
MakeOSPrtBootInstall(TS_MAIN_DRV_LET,TS_CDROM_DRV_LET);
DelTree(TS_DISTRO_DIR);
CopyTree(TS_MAIN_DRV ":/",TS_DISTRO_DIR "/");
DelTree(TS_DISTRO_DIR "/Accts/TS");
DelTree(TS_DISTRO_DIR "/Linux");
DelTree(TS_DISTRO_DIR "/Windows");
DelTree(TS_DISTRO_DIR "/Apps");
DelTree(TS_DISTRO_DIR "/Demo");
Del(TS_DISTRO_DIR "/0000Boot/OldMBR.BIN.C");
Del(TS_DISTRO_DIR "/0000Boot/BootMHD2.BIN.C");
Del(TS_DISTRO_DIR "/Adam/WordStat/*.DAT*");
DelTree(TS_DISTRO_DIR "/Misc/Tour");
Del(TS_DISTRO_DIR "/Misc/PCIDevices.TXT.Z");
Del(TS_DISTRO_DIR "/Misc/Bible.TXT.Z");
Del(TS_DISTRO_DIR "/Adam/God/Vocab.TXT.Z");
}
U0 MakeUltraDistro()
{
UltraDistroPrep;
CDFileCreate(TS_ISO_NAME,TS_DISTRO_DIR "/*",,TS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
DefinePrint("DD_TEMPLEOSULTRA_SIZE",
"Download $TX,"TempleOS V2.10",D="DD_OS_NAME_VERSION"$ - UltraLite Distro (%0.1f MB)",
0.1*(10*Size(TS_ISO_NAME,"+s")/1024/1024));
Drv(TS_MAIN_DRV_LET);
}
U0 TSWebFile(U8 *name)
{
U8 *name2;
CDirEntry de;
if (FileFind(name,&de)) {
Free(de.full_name);
"File:%s\n",name;
UncollapseFile(name,NULL);
Touch(name,"",,de.datetime);
name2=ChgExt(name,"html");
ToHtml(name,name2,
"<title>The Temple Operating System</title>\n"
"<meta name=\"keywords\" content=\"Operating System,64-Bit,64 Bit,Temple,OS,TempleOS,Free,Open Source,Public Domain,x86_64\">\n"
);
Touch(name2,"",,de.datetime);
Free(name2);
}
}
U0 MakeWebSite()
{
CDirEntry *tempde,*tempde1;
if (ts_has_bak_drv) {
DocClear;
Cd(TS_BAK_DRV ":/Wb");
DelTree(TS_BAK_DRV ":/Wb/Accts/TS/TAD");
Del(TS_BAK_DRV ":/Wb/Accts/TS/*");
Touch(TS_BAK_DRV ":/Wb/Accts/TS/Wb2/index.TXT.Z","",,Now);
Touch(TS_BAK_DRV ":/Wb/Accts/TS/Wb2/Downloads.TXT.Z","",,Now);
Touch(TS_BAK_DRV ":/Wb/Accts/TS/Wb2/TempleOS.TXT.Z","",,Now);
tempde=tempde1=FilesFind("*",FUF_RECURSE|FUF_JUST_FILES|FUF_JUST_TXT|FUF_CLUSTER_ORDER);
while (tempde) {
TSWebFile(tempde->full_name);
tempde=tempde->next;
}
DirTreeDel(tempde1);
Drv(TS_MAIN_DRV_LET);
}
}
U0 FreshenWebDir(U8 *dirname)
{
CDirEntry *tempde,*tempde1;
U8 *src,*dst;
src=MStrPrint(TS_BAK_DRV ":/Wb%s/*",dirname);
Del(src);
Free(src);
src=MStrPrint(TS_MAIN_DRV ":%s/*",dirname);
dst=MStrPrint(TS_BAK_DRV ":/Wb%s",dirname);
Copy(src,dst);
Free(src);
Free(dst);
src=MStrPrint(TS_BAK_DRV ":/Uncompressed%s/*",dirname);
Del(src);
Free(src);
src=MStrPrint(TS_MAIN_DRV ":%s/*",dirname);
dst=MStrPrint(TS_BAK_DRV ":/Uncompressed%s",dirname);
Copy(src,dst);
Free(src);
Free(dst);
src=MStrPrint(TS_BAK_DRV ":/Wb%s/*",dirname);
tempde=tempde1=FilesFind(src,FUF_JUST_FILES|FUF_JUST_TXT|FUF_CLUSTER_ORDER);
while (tempde) {
TSWebFile(tempde->full_name);
tempde=tempde->next;
}
DirTreeDel(tempde1);
}
U0 MakeWebSitePartial()
{
if (ts_has_bak_drv) {
FreshenWebDir("/Accts/TS/Wb2");
FreshenWebDir("/Accts/TS/Wb2/Rants/TAD");
FreshenWebDir(TS_BLOG_DIR);
Drv(TS_MAIN_DRV_LET);
}
}
I64 TSUncompress()
{
I64 result=0;
if (ts_has_bak_drv) {
DelTree(TS_BAK_DRV ":/Uncompressed");
CopyTree(TS_MAIN_DRV ":/",TS_BAK_DRV ":/Uncompressed");
result=Unzip(TS_BAK_DRV ":/Uncompressed/*.Z");
CursorRem(TS_BAK_DRV ":/Uncompressed/*");
}
"Files Copied:%d\n",result;
return result;
}
U0 UpdateISODocDefines()
{
DefinePrint("DD_TEMPLEOSCD_SIZE",
"Download $TX,"TempleOS V2.10",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
0.1*(10*Size(TS_BAK_DRV ":/Wb/TempleOSCD.ISO","+s")/1024/1024));
}
UpdateISODocDefines;
public U0 MakeDistrosAndBackUp()
{
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
progress4=*progress4_desc=0;
progress4_max=12;
WordStat;
WinMax;
WinBorder;
ChkAll; progress4++;
if (ts_has_bak_drv) {
MakeLineRepFile; progress4++;
TSCopyDrv(TS_MAIN_DRV_LET,TS_BAK_DRV_LET); progress4++;
DelTree (TS_BAK_DRV ":/Wb"); progress4++;
CopyTree(TS_MAIN_DRV ":/",TS_BAK_DRV ":/Wb"); progress4++;
DocClear;
MakeStdDistro; progress4++;
DocClear;
Copy(TS_ISO_NAME,TS_BAK_DRV ":/Wb/TempleOSCD.ISO"); progress4++;
UpdateISODocDefines;
Cd(TS_MAIN_DRV ":/");
if (LinkChk)
throw;
progress4++;
MakeSymFiles; progress4++;
MakeWebSite; progress4++;
TSUncompress; progress4++;
}
Drv(TS_MAIN_DRV_LET);
ChkAll; progress4++;
progress4=progress4_max=0;
SettingsPop;
}
public U0 TSMount()
{
if (!dsk.auto_mount_ide_cnt) {
Auto(CFG_HARD_DRVS "\n");
Mount;
}
}
U0 TSCopy()
{
if (ts_cid==CID_DFT) {//Dangerous! don't do on my main machine
Fmt(TS_MAIN_DRV_LET,,FALSE);
CopyTree(TS_CDROM_DRV ":/",TS_MAIN_DRV ":/");
TSMakeOSPrtBootInstall(TS_MAIN_DRV_LET);
Fmt(TS_BAK_DRV_LET,,FALSE);
CopyTree(TS_CDROM_DRV ":/",TS_BAK_DRV ":/");
TSMakeOSPrtBootInstall(TS_BAK_DRV_LET);
Reboot;
}
}
U0 TSPrtDsk()
{
CTask *task=SpawnUser;
CATARep *root=NULL,*ata_drv=NULL,*atapi_drv=NULL;
if (ts_cid==CID_DFT) {//Dangerous! don't do on my main machine
ATARep(FALSE,TRUE,&root);
ATAIDDrvs(root,*sys_acct,&ata_drv,&atapi_drv);
if (ata_drv) {
XTalkWait(task,"PrtDsk;\nY%C2p%d\nYYY",TS_MAIN_DRV_LET,ata_drv->num);
XTalkWait(task,"%d\nY\nY\n",(prt_dsk_dsk_size-PRT_HEADER)/2);
}
Kill(task);
}
}
public U0 TSUpgrade()
{
if (ts_cid==CID_DFT) {//Dangerous! don't do on my main machine
TSMount;
TSCopy;
}
}
public U0 TSInstall()
{
if (ts_cid==CID_DFT) {//Dangerous! don't do on my main machine
TSPrtDsk;
TSCopy;
}
}
-276
View File
@@ -1,276 +0,0 @@
class CSHEntry
{
CDocEntry *next,*last;
};
class CSHSection
{
CDocEntry *next,*last;
};
U8 *SHSkipDataType(U8 *st)
{
if (!st)
return NULL;
while (Bt(chars_bitmap_white_space,*st))
st++;
if (*st=='#')
return st;
while (Bt(chars_bitmap_alpha_numeric,*st))
st++;
while (Bt(chars_bitmap_white_space,*st))
st++;
while (*st=='*')
st++;
return st;
}
U8 *SHSkipLabel(U8 *st)
{
if (!st)
return NULL;
while (Bt(chars_bitmap_white_space,*st))
st++;
while (Bt(chars_bitmap_alpha_numeric,*st))
st++;
while (Bt(chars_bitmap_white_space,*st))
st++;
return st;
}
U8 *SHNewEntry(CDocEntry *doc_e,I64 *_type=NULL)
{
U8 *st;
if (doc_e->type_u8==DOCT_TEXT && (st=doc_e->tag)) {
if (!StrNCmp("#help_index",st,11)) {
if (_type) *_type=0;
return st+11;
} else if (!StrNCmp("#help_file",st,10)) {
if (_type) *_type=1;
return st+10;//'#' makes it first alphabetically.
} else if (!StrNCmp("import",st,6)) {
if (_type) *_type=2;
return st+6;
} else if (!StrNCmp("public import",st,13)) {
if (_type) *_type=2;
return st+13;
} else if (!StrNCmp("_import",st,7)) {
if (_type) *_type=2;
return SHSkipLabel(st+7);
} else if (!StrNCmp("public _import",st,14)) {
if (_type) *_type=2;
return SHSkipLabel(st+14);
} else if (!StrNCmp("_intern",st,7)) {
if (_type) *_type=3;
return SHSkipLabel(st+7);
} else if (!StrNCmp("public _intern",st,14)) {
if (_type) *_type=3;
return SHSkipLabel(st+14);
} else if (!StrNCmp("extern",st,6)) {
if (_type) *_type=4;
return st+6;
} else if (!StrNCmp("public extern",st,13)) {
if (_type) *_type=4;
return st+13;
} else if (!StrNCmp("_extern",st,7)) {
if (_type) *_type=4;
return SHSkipLabel(st+7);
} else if (!StrNCmp("public _extern",st,14)) {
if (_type) *_type=4;
return SHSkipLabel(st+14);
}
}
if (_type) *_type=-1;
return NULL;
}
I64 SHCompareEntry(CSHEntry *e1,CSHEntry *e2)
{
U8 *st1,*st2;
I64 t1,t2;
if (e1 && e2 && e1->next!=e1 && e2->next!=e2) {
if (e1->next->type_u8==DOCT_TEXT && e2->next->type_u8==DOCT_TEXT) {
st1=SHNewEntry(e1->next,&t1);
st2=SHNewEntry(e2->next,&t2);
if (t1!=t2)
return t1-t2;
else {
if (st1&&st2) {
st1=SHSkipDataType(st1);
st2=SHSkipDataType(st2);
if (st1&&st2)
return StrCmp(st1,st2);
else
return Sign(st1-st2);
} else
return Sign(st1-st2);
}
} else
return Sign(e1->next-e2->next);
} else
return Sign(e1-e2);
}
U0 SHSortSection(CSHSection *temps)
{
I64 i=0,cnt;
CSHEntry **a;
CDocEntry *doc_e,*doc_e1;
cnt=0;
doc_e=temps->next;
while (doc_e!=temps) {
if (SHNewEntry(doc_e))
cnt++;
doc_e=doc_e->next;
}
cnt++;
a=MAlloc(sizeof(CSHEntry *)*cnt);
for (i=0;i<cnt;i++) {
a[i]=MAlloc(sizeof(CSHEntry));
QueInit(a[i]);
}
i=0;
doc_e=temps->next;
while (doc_e!=temps) {
doc_e1=doc_e->next;
QueRem(doc_e);
if (SHNewEntry(doc_e))
i++;
QueIns(doc_e,a[i]->last);
doc_e=doc_e1;
}
QSortI64(a,cnt,&SHCompareEntry);
for (i=0;i<cnt;i++) {
doc_e=a[i]->next;
while (doc_e!=a[i]) {
doc_e1=doc_e->next;
QueRem(doc_e);
QueIns(doc_e,temps->last);
doc_e=doc_e1;
}
Free(a[i]);
}
Free(a);
}
U8 *SHNewSection(CDocEntry *doc_e)
{
U8 *st;
if (doc_e->type_u8==DOCT_TEXT && (st=doc_e->tag)) {
if (!StrNCmp(st,"#help_index",11))
return st+11;
}
return NULL;
}
I64 SHCompareSection(CSHSection *e1,CSHSection *e2)
{
I64 i1,i2;
U8 *st1,*st2;
if (e1 && e2 && e1->next!=e1 && e2->next!=e2) {
if (e1->next->type_u8==DOCT_TEXT && e2->next->type_u8==DOCT_TEXT) {
st1=SHNewSection(e1->next);
st2=SHNewSection(e2->next);
if (st1&&st2) {
if (StrMatch("\"\"",st1))
i1=1;
else
i1=0;
if (StrMatch("\"\"",st2))
i2=1;
else
i2=0;
if (i1!=i2)
return i1-i2;
else
return StrCmp(st1,st2);
} else
return Sign(st1-st2);
} else
return Sign(e1->next-e2->next);
} else
return Sign(e1-e2);
}
public U0 TSSortHeader(U8 *name)
{
CDoc *doc;
I64 i=0,cnt;
CSHSection **a;
CDocEntry *doc_e,*doc_e1;
if (!name || !*name || !FileFind(name))
return;
doc=DocRead(name,DOCF_PLAIN_TEXT_WITH_TABS|DOCF_NO_CURSOR);
cnt=1;
doc_e=doc->root.next;
while (doc_e!=doc) {
if (SHNewSection(doc_e))
cnt++;
doc_e=doc_e->next;
}
a=MAlloc(sizeof(CSHSection *)*cnt);
for (i=0;i<cnt;i++) {
a[i]=MAlloc(sizeof(CSHSection));
QueInit(a[i]);
}
i=0;
doc_e=doc->root.next;
while (doc_e!=doc) {
doc_e1=doc_e->next;
if (doc_e->type_u8==DOCT_TEXT && doc_e->tag && *doc_e->tag) {
QueRem(doc_e);
if (SHNewSection(doc_e))
i++;
QueIns(doc_e,a[i]->last);
} else
DocEntryDel(doc,doc_e);
doc_e=doc_e1;
}
QSortI64(a,cnt,&SHCompareSection);
for (i=0;i<cnt;i++) {
if (a[i]->next!=a[i]) {
SHSortSection(a[i]);
doc_e=a[i]->next;
while (doc_e!=a[i]) {
doc_e1=doc_e->next;
QueRem(doc_e);
QueIns(doc_e,doc->root.last);
if (doc_e->type_u8==DOCT_TEXT && doc_e->tag) {
doc->cur_entry=doc_e;
doc->cur_data_col=StrLen(doc_e->tag);
DocPrint(doc,"\n");
}
doc_e=doc_e1;
}
if (i+1<cnt && a[i+1]->next!=a[i+1])
DocPrint(doc,"\n");
}
Free(a[i]);
}
Free(a);
DocWrite(doc);
DocDel(doc);
}
public U0 TSSortHeaders()
{
TSSortHeader("/Kernel/Adam1b.HPP.Z");
TSSortHeader("/Kernel/Adam1c.HPP.Z");
TSSortHeader("/Kernel/KExts.CPP.Z");
TSSortHeader("/Compiler/CmpExts.CPP.Z");
TSSortHeader("/Compiler/Cmp.HPP.Z");
TSSortHeader("/Adam/AdamExts.HPP.Z");
}
+1 -1
View File
@@ -17,7 +17,7 @@ _BEEPS::
//You can always clobber RAX,RBX,RCX,RDX,R8,R9. The compiler expects that.
PUSH RBP
MOV RBP,RSP
MOV RCX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/Adam1a.HPP,SF_ARG1"$
MOV RCX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/KernelA.HPP,SF_ARG1"$
@@05: PUSH RCX
//U0 $LK,"Beep",A="MN:Beep"$(I64 freq=500,Bool busy=FALSE)
+2 -2
View File
@@ -17,13 +17,13 @@ USE64 //Defaults to 64, but this is a good habit.
JIFFIES_MSG: DU8 "Jiffies:",0;
//See $LK,"::/Kernel/Str1a.CPP",A="FL:::/Kernel/Str1a.CPP,1"$ and $LK,"::/Kernel/Utils1a.CPP"$.
//See $LK,"::/Kernel/StrA.CPP",A="FL:::/Kernel/StrA.CPP,1"$ and $LK,"::/Kernel/KUtils.CPP"$.
_BEEPS2::
//You can clobber RAX,RBX,RCX,RDX,R8,R9. The compiler expects that.
PUSH RBP
MOV RBP,RSP
MOV RCX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/Adam1a.HPP,SF_ARG1"$
MOV RCX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/KernelA.HPP,SF_ARG1"$
PUSH U64 [&cnts.jiffies]
+1 -1
View File
@@ -5,7 +5,7 @@ error, like when repeatedly #including
it from the cmd line.
These are many useful kernel
routines $LK,"::/Kernel/Str1a.CPP",A="FF:::/Kernel/Str1a.CPP,PUT_CHARS"$
routines $LK,"::/Kernel/StrA.CPP",A="FF:::/Kernel/StrA.CPP,PUT_CHARS"$
intended to be called from
asm. Generally, they preserve
regs.
+16 -18
View File
@@ -51,29 +51,27 @@ Call(_BUZZ_FIZZ);
_BUZZ_FIZZ+0x0001 488BEC MOV U64 RBP,U64 RSP
_BUZZ_FIZZ+0x0004 56 PUSH U64 RSI
_BUZZ_FIZZ+0x0005 57 PUSH U64 RDI
_BUZZ_FIZZ+0x0006 BE06000000 MOV U64 RSI,U32 00000006
_BUZZ_FIZZ+0x000B BF07000000 MOV U64 RDI,U32 00000007
_BUZZ_FIZZ+0x0010 B801000000 MOV U64 RAX,U32 00000001
_BUZZ_FIZZ+0x0015 E88F7D2480 CALL I32 PUT_HEX_U64+0x0000
_BUZZ_FIZZ+0x0006 BE06000000 MOV U32 ESI,U32 00000006
_BUZZ_FIZZ+0x000B BF07000000 MOV U32 EDI,U32 00000007
_BUZZ_FIZZ+0x0010 B801000000 MOV U32 EAX,U32 00000001
_BUZZ_FIZZ+0x0015 E8C51F2BC0 CALL I32 PUT_HEX_U64+0x0000
_BUZZ_FIZZ+0x001A 50 PUSH U64 RAX
_BUZZ_FIZZ+0x001B B820000000 MOV U64 RAX,U32 00000020
_BUZZ_FIZZ+0x0020 E8E87D2480 CALL I32 PUT_CHARS+0x0000
_BUZZ_FIZZ+0x001B B820000000 MOV U32 EAX,U32 00000020
_BUZZ_FIZZ+0x0020 E81E202BC0 CALL I32 PUT_CHARS+0x0000
_BUZZ_FIZZ+0x0025 48FFCE DEC U64 RSI
_BUZZ_FIZZ+0x0028 7514 JNZ I8 _BUZZ_FIZZ+0x003E
_BUZZ_FIZZ+0x002A 48B846495A5A MOV U64 RAX,U32 5A5A4946
_BUZZ_FIZZ+0x0030 2000 AND U8 [RAX],U8 AL
_BUZZ_FIZZ+0x0032 0000 ADD U8 [RAX],U8 AL
_BUZZ_FIZZ+0x0034 E8D47D2480 CALL I32 PUT_CHARS+0x0000
_BUZZ_FIZZ+0x0039 BE06000000 MOV U64 RSI,U32 00000006
_BUZZ_FIZZ+0x002A 48B846495A5A MOV U64 RAX,I64 000000205A5A4946
_BUZZ_FIZZ+0x0030 20000000
_BUZZ_FIZZ+0x0034 E80A202BC0 CALL I32 PUT_CHARS+0x0000
_BUZZ_FIZZ+0x0039 BE06000000 MOV U32 ESI,U32 00000006
_BUZZ_FIZZ+0x003E 48FFCF DEC U64 RDI
_BUZZ_FIZZ+0x0041 7514 JNZ I8 _BUZZ_FIZZ+0x0057
_BUZZ_FIZZ+0x0043 48B842555A5A MOV U64 RAX,U32 5A5A5542
_BUZZ_FIZZ+0x0049 2000 AND U8 [RAX],U8 AL
_BUZZ_FIZZ+0x004B 0000 ADD U8 [RAX],U8 AL
_BUZZ_FIZZ+0x004D E8BB7D2480 CALL I32 PUT_CHARS+0x0000
_BUZZ_FIZZ+0x0052 BF07000000 MOV U64 RDI,U32 00000007
_BUZZ_FIZZ+0x0057 B80A000000 MOV U64 RAX,U32 0000000A
_BUZZ_FIZZ+0x005C E8AC7D2480 CALL I32 PUT_CHARS+0x0000
_BUZZ_FIZZ+0x0043 48B842555A5A MOV U64 RAX,I64 000000205A5A5542
_BUZZ_FIZZ+0x0049 20000000
_BUZZ_FIZZ+0x004D E8F11F2BC0 CALL I32 PUT_CHARS+0x0000
_BUZZ_FIZZ+0x0052 BF07000000 MOV U32 EDI,U32 00000007
_BUZZ_FIZZ+0x0057 B80A000000 MOV U32 EAX,U32 0000000A
_BUZZ_FIZZ+0x005C E8E21F2BC0 CALL I32 PUT_CHARS+0x0000
_BUZZ_FIZZ+0x0061 58 POP U64 RAX
_BUZZ_FIZZ+0x0062 48FFC0 INC U64 RAX
_BUZZ_FIZZ+0x0065 4883F864 CMP U64 RAX,I8 64
+2 -2
View File
@@ -26,7 +26,7 @@ MUL_BY_HAND_U8_U8_TO_U16: //This is only for fun.
_MUL_BY_HAND_U8_U8_TO_U16:: //C callable
PUSH RBP
MOV RBP,RSP
MOV AL,U8 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/Adam1a.HPP,SF_ARG1"$
MOV AL,U8 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/KernelA.HPP,SF_ARG1"$
MOV BL,U8 SF_ARG2[RBP]
CALL MUL_BY_HAND_U8_U8_TO_U16
MOVZX RAX,AX
@@ -38,7 +38,7 @@ _MUL_U64_U64_TO_U128::
PUSH RBP
MOV RBP,RSP
MOV RBX,U64 SF_ARG3[RBP]
MOV RAX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/Adam1a.HPP,SF_ARG1"$
MOV RAX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/KernelA.HPP,SF_ARG1"$
MUL U64 SF_ARG2[RBP] //Result RDX:RAX 128bit
MOV U64 [RBX],RAX
MOV U64 8[RBX],RDX
+1 -1
View File
@@ -6,7 +6,7 @@ PUT_DEC_U64::
MOV RBP,RSP
SUB RSP,24 //24 char buffer on stack
//$LK,"Save regs",A="FF:::/Kernel/Adam1a.HPP,PUSH_C_REGS"$ which C code is free to clobber. We don't have to for C callers,
//$LK,"Save regs",A="FF:::/Kernel/KernelA.HPP,PUSH_C_REGS"$ which C code is free to clobber. We don't have to for C callers,
//but this function will be nice for ASM callers if it saves all regs.
PUSH_C_REGS
+1 -1
View File
@@ -10,7 +10,7 @@
#define IC_CALL_END2 0x08
#define IC_RETURN_VAL 0x09
#define IC_RETURN_VAL2 0x0A
#define IC_IMM_U64 0x0B
#define IC_IMM_I64 0x0B
#define IC_IMM_F64 0x0C
#define IC_STR_CONST 0x0D
#define IC_ABS_ADDR 0x0E
+2 -2
View File
@@ -4,10 +4,10 @@ U0 AFSetIPDemo()
WinBorder(ON);
l=Fs->pix_left+Fs->scroll_x;
t=Fs->pix_top+Fs->scroll_y;
SetIP(,,,FALSE,FALSE); //Mouse unclicked
IPSet(,,,FALSE,FALSE); //Mouse unclicked
AFSetIP(,l-4,t-4);
AFSetIP(20,l+20,t+20,,TRUE);
SetIP(,,,FALSE,FALSE);
IPSet(,,,FALSE,FALSE);
}
AFSetIPDemo;
+13
View File
@@ -0,0 +1,13 @@
U0 Directives()
{
"Date :%s\n",__DATE__;
"Time :%s\n",__TIME__;
"File :%s\n",__FILE__;
"Dir :%s\n",__DIR__;
"Line :%d\n",__LINE__;
"Depth:%d\n",__DEPTH__;
"Instruction1:%P:%08X\n",$$,$$;
"Instruction2:%P:%08X\n",$$,$$;
}
Directives;
+1 -1
View File
@@ -7,7 +7,7 @@ documentation.
*/
DefineLoad("COMPANY","Trivial Solutions");
DefineLoad("COMPANY","Acme Inc");
"Company: $$TX,\"\",D=\"COMPANY\"$$\n";
DefinePrint("COMPANY_TIME","%T",Now);
+1 -1
View File
@@ -57,7 +57,7 @@ Note: Not all $LK,"CDocEntry",A="MN:CDocEntry"$'s are full-sized nodes.
Some are $LK,"MAlloc",A="MN:MAlloc"$ed with a smaller size to save
mem. They all have at least the size $LK,"CDocEntryBase",A="MN:CDocEntryBase"$.
Note: $LK,"CDocEntry",A="MN:CDocEntry"$'s should be allocated from the
Note: $LK,"CDocEntry",A="MN:CDocEntry"$'s should be alloced from the
heap of the owning task, doc->mem_task.
The flag arrays $LK,"doldoc.type_flags_form",A="MN:CDolDocGlbls"$, etc
Binary file not shown.
+34 -30
View File
@@ -5,16 +5,16 @@ it only occurs once in files.
It's a brute force solution, but
gets the job done... slowly.
$LK,"Grep",A="MN:Grep"$() returns a count of matches.
$LK,"Find",A="MN:Find"$() returns a count of matches.
$LK,"FileOcc",A="MN:FileOcc"$() is $LK,"Grep",A="MN:Grep"$() with
$LK,"FileOcc",A="MN:FileOcc"$() is $LK,"Find",A="MN:Find"$() with
output $LK,"Silent",A="MN:Silent"$().
*/
U0 UnusedDefineScan()
{
CDoc *old_put_doc,*old_display_doc,*doc;
I64 cnt=0;
I64 i,cnt=0;
CHashTable *table;
CHash *temph;
CDocEntry *doc_e,*doc_e2;
@@ -26,11 +26,13 @@ U0 UnusedDefineScan()
try {
table=Fs->hash_table;
while (table) {
temph=table->next_added;
while (temph!=table) {
if (temph->type&HTT_DEFINE_STR)
cnt++;
temph=temph->next_added;
for (i=0;i<=table->mask;i++) {
temph=table->body[i];
while (temph) {
if (temph->type&HTT_DEFINE_STR)
cnt++;
temph=temph->next;
}
}
table=table->next;
}
@@ -41,32 +43,34 @@ U0 UnusedDefineScan()
table=Fs->hash_table;
while (table) {
temph=table->next_added;
while (temph!=table) {
if (temph->type&HTT_DEFINE_STR) {
progress1++;
if (FileOcc(temph->str,"/*","+l-i+T")==1) {
doc=DocNew;
old_put_doc=DocPut;
old_display_doc=DocDisplay;
Fs->put_doc=Fs->display_doc=doc;
Grep(temph->str,"/*","+l-i+T");
Fs->put_doc=old_put_doc;
Fs->display_doc=old_display_doc;
doc_e=doc->root.next;
while (doc_e!=doc) {
if (doc_e->type_u8==DOCT_LINK) {
"%s ",temph->str;
doc_e2=DocEntryCopy(doc,doc_e);
DocInsEntry(old_put_doc,doc_e2);
'\n';
for (i=0;i<=table->mask;i++) {
temph=table->body[i];
while (temph) {
if (temph->type&HTT_DEFINE_STR) {
progress1++;
if (FileOcc(temph->str,"/*","+l-i+T")==1) {
doc=DocNew;
old_put_doc=DocPut;
old_display_doc=DocDisplay;
Fs->put_doc=Fs->display_doc=doc;
Find(temph->str,"/*","+l-i+T");
Fs->put_doc=old_put_doc;
Fs->display_doc=old_display_doc;
doc_e=doc->root.next;
while (doc_e!=doc) {
if (doc_e->type_u8==DOCT_LINK) {
"%s ",temph->str;
doc_e2=DocEntryCopy(doc,doc_e);
DocInsEntry(old_put_doc,doc_e2);
'\n';
}
doc_e=doc_e->next;
}
doc_e=doc_e->next;
DocDel(doc);
}
DocDel(doc);
}
temph=temph->next;
}
temph=temph->next_added;
}
table=table->next;
}
+1 -1
View File
@@ -1,4 +1,4 @@
#define DB_FILENAME "HOME/DataBaseDemo.BIN"
#define DB_FILENAME "::/Home/DataBaseDemo.BIN"
#define DB_MAX_ACCT 100
#define DB_ACCT_BLKS 1
+14 -14
View File
@@ -1,41 +1,41 @@
U0 RawAccess(I64 drv_let=0)
{
CPrt *p=Drv2Prt(drv_let);
CBlkDev *bdev=Drv2BlkDev(drv_let);
CDrv *dv=Let2Drv(drv_let);
CBlkDev *bd=Let2BlkDev(drv_let);
I64 blk,old_offset,old_size;
U8 *buf=MAlloc(BLK_SIZE);
PrtRep;
DrvRep;
PressAKey;
ClassRep(p);
ClassRep(dv);
PressAKey;
ClassRep(bdev);
ClassRep(bd);
PressAKey;
//Temporarily change partition range to full device.
//Normally, you are limited to just your partition.
//This is obviously $BK,1$dangerous$BK,0$!
old_offset=p->offset;
old_size =p->size;
p->offset=bdev->min_blk;
p->size=bdev->max_blk-bdev->min_blk+1;
old_offset=dv->base_offset;
old_size =dv->size;
dv->base_offset=bd->min_blk;
dv->size=bd->max_blk-bd->min_blk+1;
try {
blk=GetI64("Blk to Read: ",old_offset,bdev->min_blk,bdev->max_blk);
RBlks(p,buf,blk,1);
blk=GetI64("Blk to Read: ",old_offset,bd->min_blk,bd->max_blk);
RBlks(dv,buf,blk,1);
D(buf,BLK_SIZE);
} catch
PutExcept;
p->offset=old_offset;
p->size =old_size;
dv->base_offset=old_offset;
dv->size =old_size;
Free(buf);
}
RawAccess;
//See $LK,"RBlks",A="MN:RBlks"$(), $LK,"WBlks",A="MN:WBlks"$(), $LK,"PrtLock",A="MN:PrtLock"$(), $LK,"PrtUnlock",A="MN:PrtUnlock"$()
//See $LK,"RBlks",A="MN:RBlks"$(), $LK,"WBlks",A="MN:WBlks"$(), $LK,"DrvLock",A="MN:DrvLock"$(), $LK,"DrvUnlock",A="MN:DrvUnlock"$()
//$LK,"DBlk",A="MN:DBlk"$(), $LK,"DCluster",A="MN:DCluster"$(), $LK,"BlkDevLock",A="MN:BlkDevLock"$() and $LK,"BlkDevUnlock",A="MN:BlkDevUnlock"$().
+4 -4
View File
@@ -1,13 +1,13 @@
U0 UnusedSpaceRep()
{
I64 i;
CPrt *p;
CDrv *dv;
for (i=0;i<26;i++)
try {
p=Drv2Prt(i+'A');
if (p->type==PT_FAT32 || p->type==PT_REDSEA)
dv=Let2Drv(i+'A');
if (dv->type==DVT_FAT32 || dv->type==DVT_REDSEA)
"%C: %7.3f%% Free\n",
Prt2Drv(p),UnusedDrvSpace(Prt2Drv(p))*100.0/(p->size*BLK_SIZE);
Drv2Let(dv),UnusedDrvSpace(Drv2Let(dv))*100.0/(dv->size*BLK_SIZE);
} catch
Fs->catch_except=TRUE;
}
+15 -12
View File
@@ -1,16 +1,19 @@
U0 Install()
{
text.font[8*255+0]=0b00111100;
text.font[8*255+1]=0b01000010;
text.font[8*255+2]=0b10100101;
text.font[8*255+3]=0b10000001;
text.font[8*255+4]=0b11000011;
text.font[8*255+5]=0b10111101;
text.font[8*255+6]=0b01000010;
text.font[8*255+7]=0b00111100;
}
Install;
U8 face[8]={
0b00111100,
0b01000010,
0b10100101,
0b10000001,
0b11000011,
0b10111101,
0b01000010,
0b00111100,
};
text.font[255]=face[0](U64);
"Face:ÿ\n";
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+44 -40
View File
@@ -144,6 +144,7 @@ U0 DrawIt(CTask *task,CDC *dc)
CSprite *temps;
F64 tt;
CD3I32 poly[4];
Monster *tempm;
DCAllocDepthBuf(dc);
MemSet(panels_processed_bitmap,0,(map_width*map_height+7)>>3);
@@ -197,7 +198,7 @@ U0 DrawIt(CTask *task,CDC *dc)
LOS(xx*SCREEN_SCALE+SCREEN_SCALE/2,yy*SCREEN_SCALE+SCREEN_SCALE/2,
man_xx,man_yy)) {
if (c==YELLOW)
dc->color=RED;
dc->color=DKGRAY;
else
dc->color=c;
poly[0].x=x;
@@ -246,7 +247,7 @@ U0 DrawIt(CTask *task,CDC *dc)
GrFillPoly3(dc,4,poly);
}
if (!map[yy*map_width+xx+1]) {
dc->color=DKGRAY;
dc->color=WHITE;
poly[0].x=x+SCREEN_SCALE;
poly[0].y=y;
poly[0].z=0;
@@ -278,7 +279,7 @@ U0 DrawIt(CTask *task,CDC *dc)
GrFillPoly3(dc,4,poly);
}
if (!map[yy*map_width+xx-1]) {
dc->color=DKGRAY;
dc->color=WHITE;
poly[0].x=x;
poly[0].y=y;
poly[0].z=0;
@@ -303,9 +304,9 @@ U0 DrawIt(CTask *task,CDC *dc)
}
//Draw Monsters
for (i=0;i<NUM_MONSTERS;i++) {
x=monsters[i].x;
y=monsters[i].y;
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++) {
x=tempm->x;
y=tempm->y;
if (LOS(x,y,man_xx,man_yy)) {
x-=man_xx;
y-=man_yy;
@@ -314,7 +315,7 @@ U0 DrawIt(CTask *task,CDC *dc)
zz=0;
GrTransform(dc,&xx,&yy,&zz);
if (zz>0) {
if (monsters[i].dead)
if (tempm->dead)
SpriteMat3B(dc,x,y,0,$IB,"<2>",BI=2$,r2);
else {
tt=Tri(tS,1.0);
@@ -345,9 +346,9 @@ U0 DrawIt(CTask *task,CDC *dc)
//Draw Things on heads-up Map
dc->color=LTPURPLE;
for (i=0;i<NUM_MONSTERS;i++)
if (!monsters[i].dead)
GrPlot3(dc,2*(monsters[i].x/SCREEN_SCALE),2*(map_height-1-monsters[i].y/SCREEN_SCALE),0);
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++)
if (!tempm->dead)
GrPlot3(dc,2*(tempm->x/SCREEN_SCALE),2*(map_height-1-tempm->y/SCREEN_SCALE),0);
dc->color=LTCYAN;
GrPlot3(dc,2*(man_xx/SCREEN_SCALE),2*(map_height-1-man_yy/SCREEN_SCALE),0);
@@ -370,11 +371,13 @@ U0 Fire()
{
I64 i,x,y;
F64 d,dx,dy,xx=Cos(man_é),yy=Sin(man_é);
Monster *tempm;
Noise(100,300,1000);
for (i=0;i<NUM_MONSTERS;i++) {
x=monsters[i].x;
y=monsters[i].y;
if (!monsters[i].dead &&
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++) {
x=tempm->x;
y=tempm->y;
if (!tempm->dead &&
LOS(x,y,man_xx,man_yy)) {
dx=x-man_xx;
dy=man_yy-y;
@@ -382,7 +385,7 @@ U0 Fire()
dx/=d;
dy/=d;
if (dx*xx+dy*yy>0.995) {
monsters[i].dead=TRUE;
tempm->dead=TRUE;
if (!--monsters_left) {
tf=tS;
if (tf-t0<best_score)
@@ -397,34 +400,33 @@ U0 Fire()
U0 Init()
{
I64 i,x,y;
I64 min_map_x,max_map_x,min_map_y,max_map_y;
CDC *dc;
Monster *tempm;
DocClear;
"$$BG,BLACK$$%h*c",TEXT_ROWS/2,'\n';
SpriteExtents($IB,"<1>",BI=1$,&min_map_x,&max_map_x,&min_map_y,&max_map_y);
map_width =(max_map_x-min_map_x+1)/MAP_SCALE+2;
map_height=(max_map_y-min_map_y+1)/MAP_SCALE+2;
dc=Sprite2DC($IB,"<1>",BI=1$);
map_width =dc->width/MAP_SCALE+2;
map_height=dc->height/MAP_SCALE+2;
Free(map);
Free(panels_processed_bitmap);
map=CAlloc(map_width*map_height*sizeof(U8));
panels_processed_bitmap=MAlloc((map_width*map_height+7)>>3);
dc=DCNew(map_width*MAP_SCALE,map_height*MAP_SCALE);
Sprite3(dc,-min_map_x+MAP_SCALE,-min_map_y+MAP_SCALE,0,$IB,"<1>",BI=1$);
for (y=1;y<map_height-1;y++)
for (x=1;x<map_width-1;x++)
map[(map_height-1-y)*map_width+x]=GrPeek(dc,x*MAP_SCALE,y*MAP_SCALE);
DCDel(dc);
for (y=0;y<map_height-2;y++)
for (x=0;x<map_width-2;x++)
map[(map_height-2-y)*map_width+x+1]=GrPeek(dc,x*MAP_SCALE,y*MAP_SCALE);
DCDel(dc);
man_xx=(1+MAN_START_X)*SCREEN_SCALE;
man_yy=(map_height-1-MAN_START_Y)*SCREEN_SCALE;
man_é=0;
for (i=0;i<NUM_MONSTERS;i++) {
monsters[i].dead=FALSE;
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++) {
tempm->dead=FALSE;
do {
monsters[i].x=RandU64%((map_width-2)*SCREEN_SCALE)+SCREEN_SCALE;
monsters[i].y=RandU64%((map_height-2)*SCREEN_SCALE)+SCREEN_SCALE;
} while (!map[(monsters[i].y/SCREEN_SCALE)*map_width+monsters[i].x/SCREEN_SCALE]);
tempm->x=RandU64%((map_width-2)*SCREEN_SCALE)+SCREEN_SCALE;
tempm->y=RandU64%((map_height-2)*SCREEN_SCALE)+SCREEN_SCALE;
} while (!map[(tempm->y/SCREEN_SCALE)*map_width+tempm->x/SCREEN_SCALE]);
}
monsters_left=NUM_MONSTERS;
tf=0;
@@ -434,12 +436,14 @@ U0 Init()
U0 AnimateTask(I64)
{
I64 i,x,y,dd;
Monster *tempm;
while (TRUE) {
dd=0.25*SCREEN_SCALE*Sin(tS/2);
for (i=0;i<NUM_MONSTERS;i++)
if (!monsters[i].dead) {
x=monsters[i].x;
y=monsters[i].y;
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++)
if (!tempm->dead) {
x=tempm->x;
y=tempm->y;
if (i&1)
x+=dd;
else
@@ -457,8 +461,8 @@ U0 AnimateTask(I64)
!map[(y/SCREEN_SCALE-1)*map_width+x/SCREEN_SCALE] &&
y-RoundI64(y,SCREEN_SCALE)<SCREEN_SCALE/2)
y=RoundI64(y,SCREEN_SCALE)+SCREEN_SCALE/2;
monsters[i].x=x;
monsters[i].y=y;
tempm->x=x;
tempm->y=y;
}
}
Sleep(20);
@@ -493,7 +497,7 @@ U0 MoveMan(F64
x=Clamp(x,0,map_width*SCREEN_SCALE);
y=Clamp(y,0,map_height*SCREEN_SCALE);
color=map[y/SCREEN_SCALE*map_width+x/SCREEN_SCALE];
if (color==RED || color==GREEN) {
if (color==DKGRAY || color==GREEN) {
man_xx=x;
man_yy=y;
break;
@@ -531,11 +535,11 @@ U0 CastleFrankenstein()
);
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Fs->text_attr=RED<<4+WHITE;
Fs->text_attr=DKGRAY<<4+WHITE;
Preempt(OFF);
WinBorder;
WinMax;
WordStat;
AutoComplete;
Init;
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
@@ -583,7 +587,7 @@ fs_done:
}
CastleFrankenstein;
+
+
 
 
<
Binary file not shown.
+1 -1
View File
@@ -40,7 +40,7 @@ U0 CircleTrace()
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
WordStat;
AutoComplete;
cx=Fs->pix_width/2;
cy=Fs->pix_height/2;
Binary file not shown.
+170 -174
View File
@@ -23,9 +23,9 @@ $SP,"<2>",BI=2$
$SP,"<3>",BI=3$
$SP,"<4>",BI=4$ //This is a template you can copy and use to make a tile.
$SP,"<4>",BI=4$
$SP,"<5>",BI=5$
@@ -35,28 +35,24 @@ $SP,"<7>",BI=7$
$SP,"<8>",BI=8$
$SP,"<9>",BI=9$
$SP,"<10>",BI=10$
$SP,"<11>",BI=11$
$BG$//These are indexed by color #.
//See $LK,"COLORS",A="MN:RED"$.
U8 *tiles1[16]=
{NULL,$IB,"<7>",BI=7$ ,$IB,"<5>",BI=5$ ,NULL,
$IB,"<6>",BI=6$ ,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,
$IB,"<6>",BI=6$ ,NULL,NULL,NULL,
NULL,NULL,NULL,NULL};
U8 *tiles2[16]=
{NULL,$IB,"<8>",BI=8$ ,$IB,"<5>",BI=5$ ,NULL,
$IB,"<6>",BI=6$ ,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,
$IB,"<6>",BI=6$ ,NULL,NULL,NULL,
NULL,NULL,NULL,NULL};
#define SCREEN_SCALE 24
@@ -102,11 +98,12 @@ U0 DrawIt(CTask *task,CDC *dc)
{
CDC *dc_t=DCAlias(gr.dc2,task);
I64 i,x,y,xx,yy,x1,y1,z1,color,
cx=task->pix_width/2,
cy=task->pix_height/2;
cx=task->pix_width/2,
cy=task->pix_height/2;
CD3I32 poly[4];
U8 **_tiles;
F64 tt;
Monster *tempm;
if (Blink(5))
_tiles=tiles1;
@@ -131,7 +128,7 @@ U0 DrawIt(CTask *task,CDC *dc)
xx=x+screen_x;
if (0<=xx<map_width) {
if ((color=map[yy*map_width+xx]) &&
LOS(xx,yy,man_x,man_y)) {
LOS(xx,yy,man_x,man_y)) {
if (_tiles[color]) {
x1=x*SCREEN_SCALE;
y1=y*SCREEN_SCALE;
@@ -157,13 +154,7 @@ U0 DrawIt(CTask *task,CDC *dc)
}
}
}
}
dc_t->color=LTGRAY;
for (x=-SCREEN_WIDTH/2;x<=SCREEN_WIDTH/2;x++)
GrLine3(dc_t,x*SCREEN_SCALE,-SCREEN_HEIGHT/2*SCREEN_SCALE,0,x*SCREEN_SCALE,SCREEN_HEIGHT/2*SCREEN_SCALE-1,0);
for (y=-SCREEN_HEIGHT/2;y<=SCREEN_HEIGHT/2;y++)
GrLine3(dc_t,-SCREEN_WIDTH/2*SCREEN_SCALE,y*SCREEN_SCALE,0,SCREEN_WIDTH/2*SCREEN_SCALE,y*SCREEN_SCALE-1,0);
}
for (y=-SCREEN_HEIGHT/2;y<SCREEN_HEIGHT/2;y++) {
yy=y+screen_y;
@@ -177,32 +168,32 @@ U0 DrawIt(CTask *task,CDC *dc)
y1=y*SCREEN_SCALE;
z1=0;
GrTransform(dc_t,&x1,&y1,&z1);
Sprite3(dc,x1,y1,z1,$IB,"<10>",BI=10$);
Sprite3(dc,x1,y1,z1,$IB,"<9>",BI=9$);
}
if (xx+1<map_width && LOS(xx+1,yy,man_x,man_y)) {
x1=x*SCREEN_SCALE;
y1=y*SCREEN_SCALE;
z1=0;
GrTransform(dc_t,&x1,&y1,&z1);
Sprite3(dc,x1,y1,z1,$IB,"<11>",BI=11$);
Sprite3(dc,x1,y1,z1,$IB,"<10>",BI=10$);
}
}
}
}
}
}
for (i=0;i<NUM_MONSTERS;i++)
if (!monsters[i].dead && LOS(monsters[i].x,monsters[i].y,man_x,man_y)) {
x1=(monsters[i].x-screen_x)*SCREEN_SCALE+SCREEN_SCALE/2;
y1=(monsters[i].y-screen_y)*SCREEN_SCALE+SCREEN_SCALE/2;
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++)
if (!tempm->dead && LOS(tempm->x,tempm->y,man_x,man_y)) {
x1=(tempm->x-screen_x)*SCREEN_SCALE+SCREEN_SCALE/2;
y1=(tempm->y-screen_y)*SCREEN_SCALE+SCREEN_SCALE/2;
z1=0;
GrTransform(dc_t,&x1,&y1,&z1);
if (monsters[i].dx<0) {
if (tempm->dx<0) {
dc->flags|=DCF_SYMMETRY|DCF_JUST_MIRROR;
GrSetSymmetry(dc,x1,y1,x1,y1+1);
} else
dc->flags&=~(DCF_SYMMETRY|DCF_JUST_MIRROR);
Sprite3(dc,x1,y1,z1,$IB,"<9>",BI=9$);
Sprite3(dc,x1,y1,z1,$IB,"<4>",BI=4$);
}
x1=(man_x-screen_x)*SCREEN_SCALE+SCREEN_SCALE/2;
@@ -211,6 +202,8 @@ U0 DrawIt(CTask *task,CDC *dc)
if (tS-man_attack_t0<0.2) {
x1+=Tri(tS-man_attack_t0,0.2)*SCREEN_SCALE*man_dx;
y1+=Tri(tS-man_attack_t0,0.2)*SCREEN_SCALE*man_dy;
if (man_dy!=1)
y1-=Saw(tS-man_attack_t0,0.2)*SCREEN_SCALE;
}
GrTransform(dc_t,&x1,&y1,&z1);
if (man_dx<0) {
@@ -241,12 +234,14 @@ U0 DrawIt(CTask *task,CDC *dc)
U0 Attack()
{
I64 i;
Monster *tempm;
man_attack_t0=tS;
Noise(100,300,1000);
for (i=0;i<NUM_MONSTERS;i++) {
if (!monsters[i].dead &&
man_x+man_dx==monsters[i].x && man_y+man_dy==monsters[i].y) {
monsters[i].dead=TRUE;
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++) {
if (!tempm->dead &&
man_x+man_dx==tempm->x && man_y+man_dy==tempm->y) {
tempm->dead=TRUE;
if (!--monsters_left) {
tf=tS;
if (tf-t0<best_score)
@@ -258,21 +253,21 @@ U0 Attack()
U0 Init()
{
I64 i,x,y,minx,maxx,miny,maxy;
I64 i,x,y;
CDC *dc;
SpriteExtents($IB,"<1>",BI=1$,&minx,&maxx,&miny,&maxy);
map_width =(maxx-minx+1)/MAP_SCALE;
map_height=(maxy-miny+1)/MAP_SCALE;
Monster *tempm;
dc=Sprite2DC($IB,"<1>",BI=1$);
map_width =dc->width/MAP_SCALE;
map_height=dc->height/MAP_SCALE;
Free(map);
map=MAlloc(map_width*map_height*sizeof(U8));
dc=DCNew(map_width*MAP_SCALE,map_height*MAP_SCALE);
Sprite3(dc,-minx,-miny,0,$IB,"<1>",BI=1$);
for (y=0;y<map_height;y++)
for (x=0;x<map_width;x++)
map[y*map_width+x]=GrPeek(dc,x*MAP_SCALE,y*MAP_SCALE);
DCDel(dc);
man_attack_t0=tS;
man_attack_t0=0;
man_attack=FALSE;
man_x=0;
man_y=4;
@@ -280,14 +275,14 @@ U0 Init()
man_dy=0;
screen_x=0;
screen_y=0;
for (i=0;i<NUM_MONSTERS;i++) {
monsters[i].dead=FALSE;
monsters[i].dx=0;
monsters[i].dy=0;
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++) {
tempm->dead=FALSE;
tempm->dx=0;
tempm->dy=0;
do {
monsters[i].x=RandU64%(map_width-2)+1;
monsters[i].y=RandU64%(map_height-2)+1;
} while (!map[(monsters[i].y)*map_width+monsters[i].x]);
tempm->x=RandU64%(map_width-2)+1;
tempm->y=RandU64%(map_height-2)+1;
} while (!map[(tempm->y)*map_width+tempm->x]);
}
monsters_left=NUM_MONSTERS;
tf=0;
@@ -303,19 +298,20 @@ U0 CleanUp()
U0 AnimateTask(I64)
{
I64 i,x,y,dx,dy;
Monster *tempm;
while (TRUE) {
for (i=0;i<NUM_MONSTERS;i++)
if (!monsters[i].dead) {
for (i=0,tempm=monsters;i<NUM_MONSTERS;i++,tempm++)
if (!tempm->dead) {
dx=RandU16%3-1;
dy=RandU16%3-1;
x=monsters[i].x+dx;
y=monsters[i].y+dy;
if (0<=x<=map_width && 0<=y<=map_height &&
map[y*map_width+x]) {
monsters[i].x=x;
monsters[i].y=y;
monsters[i].dx=dx;
monsters[i].dy=dy;
x=tempm->x+dx;
y=tempm->y+dy;
if (0<=x<map_width && 0<=y<map_height && map[y*map_width+x]) {
tempm->x=x;
tempm->y=y;
tempm->dx=dx;
tempm->dy=dy;
}
}
Sleep(1000);
@@ -345,7 +341,7 @@ U0 DunGen()
Fs->text_attr=BLACK<<4+WHITE;
Preempt(OFF);
WinMax;
WordStat;
AutoComplete;
Init;
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
DocCursor;
@@ -374,7 +370,7 @@ U0 DunGen()
man_dy=0;
Attack;
} else
if (man_x+1<map_width && map[man_y*map_width+(man_x+1)]==RED) {
if (man_x+1<map_width && map[man_y*map_width+(man_x+1)]==DKGRAY) {
man_x++;
if (man_x-screen_x>SCREEN_WIDTH/2-3) {
screen_x+=SCREEN_WIDTH/2;
@@ -389,7 +385,7 @@ U0 DunGen()
man_dy=0;
Attack;
} else
if (man_x-1>=0 && map[man_y*map_width+(man_x-1)]==RED) {
if (man_x-1>=0 && map[man_y*map_width+(man_x-1)]==DKGRAY) {
man_x--;
if (man_x-screen_x<-SCREEN_WIDTH/2+3) {
screen_x-=SCREEN_WIDTH/2;
@@ -404,7 +400,7 @@ U0 DunGen()
man_dy=-1;
Attack;
} else
if (man_y-1>=0 && map[(man_y-1)*map_width+man_x]==RED) {
if (man_y-1>=0 && map[(man_y-1)*map_width+man_x]==DKGRAY) {
man_y--;
if (man_y-screen_y<-SCREEN_HEIGHT/2+3) {
screen_y-=SCREEN_HEIGHT/2;
@@ -419,7 +415,7 @@ U0 DunGen()
man_dy=1;
Attack;
} else
if (man_y+1<map_height && map[(man_y+1)*map_width+man_x]==RED) {
if (man_y+1<map_height && map[(man_y+1)*map_width+man_x]==DKGRAY) {
man_y++;
if (man_y-screen_y>SCREEN_HEIGHT/2-3) {
screen_y+=SCREEN_HEIGHT/2;
@@ -448,127 +444,127 @@ dg_done:
}
DunGen;
£
|˜
˜øÿÿÿ˜
˜´
´´øÿÿÿ
´øÿÿÿ˜øÿÿÿ
¤¤
œ °
° °üÿÿÿ
°üÿÿÿœüÿÿÿ
œüÿÿÿœ
œ¬
¬¬
¬ 
  
 ¨
¤$Ì$
Ì$Ì@
Ì@¤@
¤@¤(
¨(È(
È(È<
È<¨<
¨<¨,
¨,Ä,
Ä,Ä8
Ä8¬8
¬8¬0
¬0À0
À0À4
À4°4
Ì4ä4
ä(ä@
ä@@
@
ø
øø$
ø$ä$
è(ü(
üü<
ø<è<
è8è,
è,ø,
ø,ø8
ø8ì<
ì8ì0
ì0ô0
ð4ô4
ô8ð8
üü
üì
èøÿÿÿè
èÔ
ÔÔøÿÿÿ
Ôøÿÿÿäøÿÿÿ
äøÿÿÿà
ä äüÿÿÿ
äüÿÿÿØüÿÿÿ
ØüÿÿÿØ
Ø Ü
Ü Ü
àà
ÐÌ
ÈüÿÿÿÈ
È Ä
Ä Äüÿÿÿ
 4�4
Œ,Œ<
Œ<€<
€<€,
€,ˆ,
ˆ,ˆ8
ˆ8„8
„8„0
˜4˜L
”LœL
œLœX
œX”X
”X”P
˜P˜T
¼ôÿÿÿ¼0
¼8¼P
¼P¼X°Ä,Ä8Rýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²%þÿÿÿëÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
£
7
7üÿÿÿ7
7S
SSüÿÿÿ
Süÿÿÿ7üÿÿÿ
CC$
;O
OO
O;
;;
; K
K K
K?
??
?G
C(k(
k(kD
kDCD
CDC,
G,g,
g,g@
g@G@
G@G0
G0c0
c0c<
c<K<
K<K4
K4_4
_4_8
_8O8
k8ƒ8
ƒ,ƒD
ƒDŸD
ŸDŸ
Ÿ—
——(
—(ƒ(
‡,›,
› ›@
—@‡@
‡<‡0
‡0—0
—0—<
—<‹@
‹<‹4
‹4“4
�8“8
“<�<
››
›‹
‡üÿÿÿ‡
‡s
ssüÿÿÿ
süÿÿÿƒüÿÿÿ
ƒüÿÿÿ
ƒƒ
ƒw
ww
w{
{{

ok
gg
gc
cc
?8/8
+0+@
+@ @
@ 0
0'0
'0'<
'<#<
#<#4
787P
3P;P
;P;\
;\3\
3\3T
7T7X
[øÿÿÿ[4
[<[T
[T[\Oc0c<Òýÿÿÿëÿÿÿ&ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿJ$ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ýÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿ   ÿÿÿ    ÿÿ      ÿÿÿ    ÿÿ   ÿÿ  ÿÿÿÿÿÿ      ÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿ     ÿÿÿ    ÿÿ    ÿÿÿ    ÿÿ    ÿÿ  ÿÿÿÿÿÿ       ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ' ìÿÿÿéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
òþÿÿÿüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ b ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²'$ìÿÿÿäÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²öÿÿÿèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²ýÿÿÿüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²ýÿÿÿüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿ   ÿÿÿÿ    ÿÿ      ÿÿ    ÿ    ÿ   ÿ       ÿ   ÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²ýÿÿÿüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿ     ÿÿÿÿ    ÿÿÿ    ÿÿÿÿ    ÿÿÿ    ÿÿÿ   ÿÿÿ       ÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ²ýÿÿÿüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
’ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2õÿÿÿèÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿÿÿÿ ÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿ  ÿÿÿÿÿÿÿ ÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿ ÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿ ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‚øÿÿÿéÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ  ÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿ ÿÿÿÿÿ ÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ"ùÿÿÿìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍ÿÿÿÿÿÿÿÿÿ␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿ␍␍␍␍␍␍ÿÿÿÿÿÿÿÿÿÿ␍␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
+6 -6
View File
@@ -59,7 +59,7 @@ U0 CriticalSectionEnd()
LBtr(&critical_section_flag,0);
}
/*These are $BK,1$NOT$BK,0$ deallocated after the program ends,
/*These are $BK,1$NOT$BK,0$ dealloced after the program ends,
but I did them this way for your benefit
so 2D array indexing is not done by hand.
You can type "EagleDive;" at the command line
@@ -88,7 +88,7 @@ class MPCtrl {
Bool app_done;
} mp;
U0 FSTransform(CDC *dc,I64 *x,I64 *y,I64 *z)
U0 EDTransform(CDC *dc,I64 *x,I64 *y,I64 *z)
{
I64 zz;
GrRot(dc->r,x,y,z);
@@ -479,7 +479,7 @@ U0 MPDrawIt(CTask *task,CDC *dc)
//cycle initiated by core#0 to prevent flicker.
dc->flags|=DCF_TRANSFORMATION;
dc->transform=&FSTransform;
dc->transform=&EDTransform;
dc->x=cx;
dc->y=cy;
@@ -588,7 +588,7 @@ U0 DrawHorizon(CDC *dc)
GrRotZEqu(dc->r,é1);
GrSetRotMat(dc,dc->r);
dc->flags&=~DCF_TRANSFORMATION;
dc->transform=&FSTransform;
dc->transform=&EDTransform;
dc->x=cx;
dc->y=cy;
@@ -893,7 +893,7 @@ U0 EagleDive(I64 _mp_cnt=MP_MAX_PROCESSORS)
F64 pp,tt1,tt2;
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
WordStat;
AutoComplete;
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
@@ -972,4 +972,4 @@ EagleDive;
&
 üÿÿÿ
üÿÿÿáÿÿÿ
á˙˙˙):_ˇ‘é˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Line truncated
á˙˙˙):_é˙˙˙ˇ‘˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Line truncated
Binary file not shown.
+17 -19
View File
@@ -767,7 +767,7 @@ U0 FlatTops()
Fs->text_attr=BLUE<<4+WHITE;
WinMax;
WinBorder;
WordStat;
AutoComplete;
DocCursor;
DocClear;
PopUpOk("$$GREEN$${Left-Mouse}$$FG$$\t\tChange Course\n"
@@ -846,6 +846,7 @@ FlatTops;
//Maybe use this in the future $SP,"<7>",BI=7$
@@ -862,22 +863,19 @@ FlatTops;
r&��������������������������������������������������������������������������������������������������������������  � � � � � � ������������������������������������������������������r&��������������������������������������������������������������������������������������������������������������  � � � � � � ������������������������������������������������������b %������������������������������������������������������������������ ��� ����  ������������������������������������b %������������������������������������������������������������������ ��� ����  ������������������������������������0
����
���� 0
����
���� � 6,����,}i(U(U7奩��7奩����������d����迸��2���2���迸��迸��2���2���迸��i,��������,����}����i(����U(����U����7����奩��7����奩������������������d��������i����        





      


   ,����,(奩��#奩����������滌����������滌������#������������'��������'����   
    
r��������&������������������������������������������������������������������������������������������������������  � � � � � � ������������������������������������������������������r��������&������������������������������������������������������������������������������������������������������  � � � � � � ������������������������������������������������������b�������� %���������������������������������������������������������� ��� ����  ������������������������������������b�������� %���������������������������������������������������������� ��� ����  ������������������������������������Z�������� ����������������� �� ��������������������Z�������� ����������������� �� ��������������������� <,,����}����i����U����U��������奩������奩��FFd迸��������������������迸������迸��������������������迸������i����,����,��������}��������i��������U��������U����������������奩����������奩��F����F����d����i��������    
 







      

 
           ,,��������奩������奩��<2滌��-����滌������������������-����'����'��������  
    



 
+1 -1
View File
@@ -95,7 +95,7 @@ U0 Halogen()
"}"
);
Preempt(OFF);
WordStat;
AutoComplete;
WinMax;
Init;
DocCursor;
+1 -1
View File
@@ -127,7 +127,7 @@ since we will yield during GetMsg().
Preempt(OFF);
Fs->win_inhibit|=WIG_DBL_CLICK;
WordStat;
AutoComplete;
MenuPush(
"File {"
+2 -2
View File
@@ -5,7 +5,7 @@
U32 text[TEXT_ROWS][TEXT_COLS];
U0 DrawIt(CTask *task,CDC *)
{ //$LK,"gr.text_base",A="MN:CGrGlbls"$ gets clear 60fps, so we must use our own permanent text array.
{ //$LK,"gr.text_base",A="MN:CGrGlbls"$ gets clear 30fps, so we must use our own permanent text array.
MemCpy(gr.text_base+TEXT_COLS,text,(TEXT_ROWS-1)*TEXT_COLS*sizeof(U32));
// You can copy it this way, if you like:
@@ -81,7 +81,7 @@ U0 Maze()
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
WinMax;
WinBorder;
WordStat;
AutoComplete;
DocCursor;
DocClear;
Fs->draw_it=&DrawIt;
+4 -5
View File
@@ -170,16 +170,15 @@ U0 RainDrops()
DocCursor;
DocClear;
Fs->draw_it=&DrawIt;
WordStat;
AutoComplete;
try {
do {
ch=GetKey(&sc);
switch (ch) {
do
switch (ch=GetKey(&sc)) {
case '\n':
Init;
break;
}
} while (ch!=CH_ESC && ch!=CH_SHIFT_ESC);
while (ch!=CH_ESC && ch!=CH_SHIFT_ESC);
} catch
PutExcept;
SettingsPop;
+83 -63
View File
@@ -4,11 +4,14 @@ AcctRegSetDftEntry("TempleOS/RawHide","F64 best_score=9999;\n");
AcctRegExeBranch("TempleOS/RawHide");
F64 t0,tf;
I64 outside_cnt;
#define MAP_WIDTH 1500
#define MAP_HEIGHT 1500
#define MAP_WIDTH 1000
#define MAP_HEIGHT 1000
#define FENCE_WIDTH 320
#define FENCE_HEIGHT 200
#define MAP_BORDER 3
CDC *dc2;
CDC *map_dc;
$BG,10$#define GE_COW 0
@@ -23,6 +26,9 @@ $SP,"<2>",BI=2$
$SP,"<3>",BI=3$
#define GE_NUM 3
$SP,"<4>",BI=4$
$BG$
class RHCSprite
{
@@ -30,7 +36,7 @@ class RHCSprite
I64 min_x,max_x,min_y,max_y;
} rh_sprite[GE_NUM];
#define NUM_ANIMALS 128
#define NUM_ANIMALS 100
class Animal
{
@@ -43,13 +49,13 @@ class Animal
//************************************
#define COURSE_LEN (MAP_HEIGHT*2)
I32 *rx,*ry,*rw;
I32 *r_x,*r_y,*r_width;
I64 river_lo,river_hi;
U0 RiverNew()
{
rx=MAlloc(COURSE_LEN*sizeof(I32));
ry=MAlloc(COURSE_LEN*sizeof(I32));
rw=MAlloc(COURSE_LEN*sizeof(I32));
r_x=MAlloc(COURSE_LEN*sizeof(I32));
r_y=MAlloc(COURSE_LEN*sizeof(I32));
r_width=MAlloc(COURSE_LEN*sizeof(I32));
river_lo=river_hi=COURSE_LEN/2;
}
@@ -64,7 +70,7 @@ U0 RiverMake()
i=COURSE_LEN/2;
while (y.i32[1]<MAP_HEIGHT-MAP_BORDER && i<COURSE_LEN) {
if (old_x.i32[1]!=x.i32[1]||old_y.i32[1]!=y.i32[1]) {
rx[i]=x.i32[1]; ry[i]=y.i32[1]; rw[i]=w.i32[1];
r_x[i]=x.i32[1]; r_y[i]=y.i32[1]; r_width[i]=w.i32[1];
river_hi=i++;
old_x=x; old_y=y;
}
@@ -81,7 +87,7 @@ U0 RiverMake()
i=COURSE_LEN/2-1;
while (y.i32[1]>=MAP_BORDER && i>=0) {
if (old_x.i32[1]!=x.i32[1]||old_y.i32[1]!=y.i32[1]) {
rx[i]=x.i32[1]; ry[i]=y.i32[1]; rw[i]=w.i32[1];
r_x[i]=x.i32[1]; r_y[i]=y.i32[1]; r_width[i]=w.i32[1];
river_lo=i--;
old_x=x; old_y=y;
}
@@ -94,9 +100,9 @@ U0 RiverMake()
//Plot sand bar
x=0; y=0;
for (i=river_lo;i<=river_hi;i++) {
dc2->color=YELLOW;
dc2->pen_width=rw[i]+5;
GrPlot3(dc2,rx[i]+x.i32[1],ry[i]+y.i32[1],0);
map_dc->color=YELLOW;
map_dc->pen_width=r_width[i]+5;
GrPlot3(map_dc,r_x[i]+x.i32[1],r_y[i]+y.i32[1],0);
x=ClampI64(x+RandI32,-6*MAX_U32,6*MAX_U32);
y=ClampI64(y+RandI32,-6*MAX_U32,6*MAX_U32);
@@ -104,17 +110,17 @@ U0 RiverMake()
//Plot water
for (i=river_lo;i<=river_hi;i++) {
dc2->color=BLUE;
dc2->pen_width=rw[i];
GrPlot3(dc2,rx[i],ry[i],0);
map_dc->color=BLUE;
map_dc->pen_width=r_width[i];
GrPlot3(map_dc,r_x[i],r_y[i],0);
}
}
U0 RiverDel()
{
Free(rx);
Free(ry);
Free(rw);
Free(r_x);
Free(r_y);
Free(r_width);
}
//************************************
@@ -148,12 +154,12 @@ U0 RiverDropsNext(CTask *mem_task)
} else {
do {
if (RandU16&1 &&
GrPeek(dc2,rx[tempr->index]+tempr->dx,ry[tempr->index]+tempr->dy)==BLUE)
GrPeek(map_dc,r_x[tempr->index]+tempr->dx,r_y[tempr->index]+tempr->dy)==BLUE)
break;
tempr->dx=ClampI64(tempr->dx+RandU16%3-1,-rw[tempr->index]/2,rw[tempr->index]/2);
tempr->dy=ClampI64(tempr->dy+RandU16%3-1,-rw[tempr->index]/2,rw[tempr->index]/2);
} while (GrPeek(dc2,rx[tempr->index]+tempr->dx,ry[tempr->index]+tempr->dy)!=BLUE &&
GrPeek(dc2,rx[tempr->index] ,ry[tempr->index]) ==BLUE); //Might be reinitializing
tempr->dx=ClampI64(tempr->dx+RandU16%3-1,-r_width[tempr->index]/2,r_width[tempr->index]/2);
tempr->dy=ClampI64(tempr->dy+RandU16%3-1,-r_width[tempr->index]/2,r_width[tempr->index]/2);
} while (GrPeek(map_dc,r_x[tempr->index]+tempr->dx,r_y[tempr->index]+tempr->dy)!=BLUE &&
GrPeek(map_dc,r_x[tempr->index] ,r_y[tempr->index]) ==BLUE); //Might be reinitializing
}
tempr=tempr1;
}
@@ -173,7 +179,7 @@ U0 RiverDropsDraw(CDC *dc,I64 cx,I64 cy)
Yield;
tempr=rd_root.next;
while (tempr!=&rd_root) {
GrPlot(dc,rx[tempr->index]+tempr->dx-cx,ry[tempr->index]+tempr->dy-cy);
GrPlot(dc,r_x[tempr->index]+tempr->dx-cx,r_y[tempr->index]+tempr->dy-cy);
tempr=tempr->next;
}
LBtr(&rd_lock,0);
@@ -197,8 +203,8 @@ U0 DrawIt(CTask *task,CDC *dc)
if (task->scroll_y+cy>MAP_HEIGHT-task->pix_height)
task->scroll_y=MAP_HEIGHT-task->pix_height-cy;
dc2->flags|=DCF_NO_TRANSPARENTS;
GrBlot(dc,-cx,-cy,dc2);
map_dc->flags|=DCF_NO_TRANSPARENTS;
GrBlot(dc,-cx,-cy,map_dc);
RiverDropsDraw(dc,cx,cy);
@@ -237,7 +243,8 @@ U0 DrawIt(CTask *task,CDC *dc)
dc->color=BLACK;
t=tS-t0;
}
GrPrint(dc,-task->scroll_x,-task->scroll_y,"Time:%7.2fs Best:%7.2fs",t,best_score);
GrPrint(dc,-task->scroll_x,-task->scroll_y,"Outside:%03d Time:%7.2fs Best:%7.2fs",
outside_cnt,t,best_score);
}
U0 BuddySelect(I64 i)
@@ -259,8 +266,8 @@ U0 BuddySelect(I64 i)
U0 AnimateTask(CTask *parent)
{
I64 i,cx,cy,cursor_x,cursor_y,dd,ddx,ddy,cnt,max_speed=MAX_I64,
min_x,max_x,min_y,max_y,updates=0;
I64 i,cx,cy,cursor_x,cursor_y,dd,ddx,ddy,cnt,max_speed=MAX_I64,updates=0,
my_outside_cnt;
F64 f,d,dx,dy,s,stress;
Animal *tempa,*tempa1;
while (TRUE) {
@@ -269,8 +276,8 @@ U0 AnimateTask(CTask *parent)
cy=(MAP_HEIGHT-parent->pix_height)/2;
cursor_x=ip.pos.x+cx-parent->pix_left-parent->scroll_x;
cursor_y=ip.pos.y+cy-parent->pix_top -parent->scroll_y;
min_x=max_x=min_y=max_y=cnt=0;
stress=0;
cnt=0;stress=0;
my_outside_cnt=0;
for (i=0;i<NUM_ANIMALS;i++) {
tempa=&a[i];
if (!tempa->dead) {
@@ -281,7 +288,7 @@ U0 AnimateTask(CTask *parent)
d=Sqrt(dd);
dx=ddx/d;
dy=ddy/d;
f=2.0e2*MAX_U32/dd;
f=5.0e2*MAX_U32/dd;
tempa->dx+=f*dx;
tempa->dy+=f*dy;
}
@@ -316,13 +323,15 @@ U0 AnimateTask(CTask *parent)
tempa->dy=0.995*ClampI64(tempa->dy+RandI32/32,-max_speed,max_speed);
//Slow in river
if (GrPeek(dc2,tempa->x.i32[1],tempa->y.i32[1])!=LTGREEN) {
tempa->dx/=4;
tempa->dy/=4;
if (GrPeek(map_dc,tempa->x.i32[1],tempa->y.i32[1])!=LTGREEN) {
tempa->dx/=2;
tempa->dy/=2;
}
tempa->x+=tempa->dx;
tempa->y+=tempa->dy;
if (GrPeek(map_dc,(tempa->x+tempa->dx)>>32,(tempa->y+tempa->dy)>>32)!=LTGRAY) {
tempa->x+=tempa->dx;
tempa->y+=tempa->dy;
}
//Keep on map
if (!(MAP_BORDER-tempa->ge->min_x<=tempa->x.i32[1]<MAP_WIDTH-MAP_BORDER-tempa->ge->max_x)) {
@@ -333,24 +342,17 @@ U0 AnimateTask(CTask *parent)
tempa->y -=tempa->dy;
tempa->dy=-tempa->dy;
}
if (cnt) {
min_x=MinI64(min_x,tempa->x);
max_x=MaxI64(max_x,tempa->x);
min_y=MinI64(min_y,tempa->y);
max_y=MaxI64(max_y,tempa->y);
} else {
min_x=max_x=tempa->x;
min_y=max_y=tempa->y;
}
cnt++;
if (tempa->x>>32>=FENCE_WIDTH || tempa->y>>32>=FENCE_HEIGHT)
my_outside_cnt++;
}
}
outside_cnt=my_outside_cnt;
if (!(updates&15))
RiverDropsNext(parent);
if (!tf && (max_x-min_x)>>32<GR_WIDTH && (max_y-min_y)>>32<GR_HEIGHT) {
if (!tf && !outside_cnt) {
tf=tS;
music.mute=TRUE;
Snd(2000);Sleep(200);Snd(0);Sleep(100);
@@ -394,14 +396,27 @@ U0 ReInit()
I64 i;
RiverDropsDel;
dc2->color=LTGREEN;
GrRect(dc2,2,2,MAP_WIDTH-4,MAP_HEIGHT-4);
map_dc->color=LTGREEN;
GrRect(map_dc,2,2,MAP_WIDTH-4,MAP_HEIGHT-4);
RiverMake;
dc2->pen_width=MAP_BORDER;
dc2->color=RED;
GrBorder(dc2,MAP_BORDER/2,MAP_BORDER/2,MAP_WIDTH-(MAP_BORDER+1)/2,MAP_HEIGHT-(MAP_BORDER+1)/2);
//Plot fence
for (i=FENCE_WIDTH;i>0;i-=16)
Sprite3(map_dc,i,FENCE_HEIGHT,0,$IB,"<4>",BI=4$);
map_dc->pen_width=1;
map_dc->color=BROWN;
for (i=0;i<FENCE_HEIGHT-16;i+=16)
GrLine(map_dc,FENCE_WIDTH-1,i,FENCE_WIDTH-1,i+7);
map_dc->color=LTGRAY;
GrLine(map_dc,FENCE_WIDTH,0,FENCE_WIDTH,FENCE_HEIGHT-6);
map_dc->color=LTGREEN;
GrRect(map_dc,FENCE_WIDTH-63,FENCE_HEIGHT-8,46,9);
map_dc->pen_width=MAP_BORDER;
map_dc->color=RED;
GrBorder(map_dc,MAP_BORDER/2,MAP_BORDER/2,MAP_WIDTH-(MAP_BORDER+1)/2,MAP_HEIGHT-(MAP_BORDER+1)/2);
for (i=river_lo;i<=river_hi;i++)
RiverDropsNext(Fs);
@@ -417,6 +432,7 @@ U0 ReInit()
a[i].ge=&rh_sprite[GE_BULL];
BuddySelect(i);
}
outside_cnt=NUM_ANIMALS;
t0=tS;
tf=0;
}
@@ -437,14 +453,14 @@ U0 Init()
RiverNew;
rd_lock=0;
QueInit(&rd_root);
dc2=DCNew(MAP_WIDTH,MAP_HEIGHT);
map_dc=DCNew(MAP_WIDTH,MAP_HEIGHT);
a=MAlloc(NUM_ANIMALS*sizeof(Animal));
ReInit;
}
U0 CleanUp()
{
DCDel(dc2);
DCDel(map_dc);
Free(a);
RiverDropsDel;
RiverDel;
@@ -455,10 +471,9 @@ U0 RawHide()
I64 msg_code,a1,a2;
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
PopUpOk(
"Coral the cattle into an area\n"
"the size of a screen.\n\n"
"Scroll with {CTRL-Left Grab}.\n"
"Center with {CTRL-Right}.");
"Coral the cattle. The coral is in the\n"
"upper-left corner if you scroll.\n\n"
"Scroll with $$GREEN$${CTRL-Left Grab}$$FG$$.\n");
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
@@ -471,7 +486,7 @@ U0 RawHide()
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_BORDER-WIF_SELF_GRAB_SCROLL-WIF_FOCUS_TASK_MENU;
WinMax;
WordStat;
AutoComplete;
Preempt(OFF);
Init;
Fs->animate_task=Spawn(&AnimateTask,Fs,"Animate",,Fs);
@@ -509,4 +524,9 @@ rh_done:
}
RawHide;
ňö˙˙˙đ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙bö˙˙˙ô˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Âö˙˙˙đ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
òöÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿböÿÿÿôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÂöÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿd
ùÿÿÿ
úÿÿÿðÿÿÿúÿÿÿ
ÿÿÿÿðÿÿÿÿÿÿÿ
ðÿÿÿÿÿÿÿÿÿÿÿúÿÿÿ
ÿÿÿÿÿÿÿÿðÿÿÿúÿÿÿ
Binary file not shown.
Binary file not shown.
+9 -16
View File
@@ -242,22 +242,17 @@ U0 AnimateTask(I64)
dx=Cos(nozzle_é),
dy=Sin(nozzle_é),
PlaceMass(MT_DROPLET,
nozzle->x+NOZZLE_LEN*dx,nozzle->y+NOZZLE_LEN*dy,
HOSE_RADIUS,
500*dx,500*dy,
100.0,Fs->parent_task);
nozzle->x+NOZZLE_LEN*dx,nozzle->y+NOZZLE_LEN*dy,HOSE_RADIUS,
500*dx,500*dy,100.0,Fs->parent_task);
if (Rand<0.05) //faucet drip
PlaceMass(MT_DROPLET,
faucet->x,faucet->y,
HOSE_RADIUS,
0,0,
100.0,Fs->parent_task);
faucet->x,faucet->y,HOSE_RADIUS,
0,0,100.0,Fs->parent_task);
tempm=ode->next_mass;
while (tempm!=&ode->next_mass) {
tempm1=tempm->next;
if (tempm->type==MT_DROPLET &&
tempm->y+tempm->radius>GROUND_Y) {
if (tempm->type==MT_DROPLET && tempm->y+tempm->radius>GROUND_Y) {
QueRem(tempm);
Free(tempm);
}
@@ -274,8 +269,7 @@ U0 MoveNozzleTaskX(I64 sign)
{
I64 i;
for (i=0;i<NOZZLE_MOVE_STEPS;i++) {
nozzle->x=Clamp(nozzle->x+
sign*NOZZLE_MOVE/NOZZLE_MOVE_STEPS,
nozzle->x=Clamp(nozzle->x+sign*NOZZLE_MOVE/NOZZLE_MOVE_STEPS,
HOSE_RADIUS*3,GR_WIDTH-HOSE_RADIUS*3);
WinMgrSync;
}
@@ -285,8 +279,7 @@ U0 MoveNozzleTaskY(I64 sign)
{
I64 i;
for (i=0;i<NOZZLE_MOVE_STEPS;i++) {
nozzle->y=Clamp(nozzle->y+
sign*NOZZLE_MOVE/NOZZLE_MOVE_STEPS,
nozzle->y=Clamp(nozzle->y+sign*NOZZLE_MOVE/NOZZLE_MOVE_STEPS,
HOSE_RADIUS*3,GROUND_Y);
WinMgrSync;
}
@@ -340,7 +333,7 @@ U0 Squirt()
WinBorder;
Preempt(OFF);
DocCursor;
WordStat;
AutoComplete;
MenuPush(
"File {"
@@ -397,4 +390,4 @@ sq_done: //Don't goto out of try
}
Squirt;
R÷˙˙˙ě˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙2 ˙˙˙˙ű˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Jý˙˙˙ý˙˙˙˙˙˙ ˙˙ ˙ ˙˙  ˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙
R÷˙˙˙ě˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙2˙˙˙˙ű˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Jý˙˙˙ý˙˙˙˙˙˙ ˙˙ ˙ ˙˙  ˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙
Binary file not shown.
+5 -4
View File
@@ -1,15 +1,16 @@
//Generate "Stadium.GRA.Z" from "Stadium.TXT.Z"
//Generate "StadiumBG.GRA.Z" from "StadiumBG.TXT.Z"
U0 StadiumGen()
{
U0 (*fp_old_update)(CDC *dc);
CDC *dc,*dc2;
Cd(__DIR__);
WinMax;
WinBorder;
WordStat;
AutoComplete;
DocClear;
Type("::/Demo/Games/Stadium/Stadium.TXT");
Type("StadiumBG.TXT");
"$$CM,0,%d$$",TEXT_ROWS-3;
DocCursor(OFF);
fp_old_update=gr.fp_final_screen_update; //hide mouse cursor
@@ -20,7 +21,7 @@ U0 StadiumGen()
dc=DCExtract(dc2,0,FONT_HEIGHT,GR_WIDTH,GR_HEIGHT);
DCDel(dc2);
GRAWrite("::/Demo/Games/Stadium/Stadium",dc);
GRAWrite("StadiumBG",dc);
DCDel(dc);
DocCursor(ON);
Binary file not shown.
+340
View File
@@ -0,0 +1,340 @@
#define BORDER 16
#define NUM_UNITS 64
#define CIRCLE_RAD 8
#define MOVE_CIRCLES 5
class Unit
{
I64 num,x,y,player,link,color;
Bool alive,king;
} u[NUM_UNITS];
CDC *map_dc;
I64 cur_player,num_alive[2],start_x,start_y,end_x,end_y;
Bool show_start;
U0 S2Circle(I64 *_x,I64 *_y)
{
I64 i,j;
j=(*_y-BORDER)/(CIRCLE_RAD*2);
if (j&1)
i=(*_x-CIRCLE_RAD-BORDER)/(CIRCLE_RAD*2);
else
i=(*_x-BORDER)/(CIRCLE_RAD*2);
*_y=j;
*_x=i;
}
U0 Circle2S(I64 *_x,I64 *_y)
{
I64 j=*_y,i=*_x;
*_y=j*CIRCLE_RAD*2+CIRCLE_RAD+BORDER;
*_x=i*CIRCLE_RAD*2+CIRCLE_RAD+BORDER;
if (j&1) *_x+=CIRCLE_RAD;
}
U0 S2W(I64 *_x,I64 *_y)
{
S2Circle(_x,_y);
Circle2S(_x,_y);
}
U0 DrawIt(CTask *task,CDC *dc)
{
I64 i;
map_dc->flags|=DCF_NO_TRANSPARENTS;
GrBlot(dc,0,0,map_dc);
if (cur_player==0) {
dc->color=LTCYAN;
GrFloodFill(dc,0,0);
dc->color=CYAN;
} else {
dc->color=LTPURPLE;
GrFloodFill(dc,0,0);
dc->color=PURPLE;
}
GrPrint(dc,2,2,"Player %d",cur_player+1);
for (i=0;i<NUM_UNITS;i++)
if (u[i].alive) {
dc->color=u[i].color;
GrFloodFill(dc,u[i].x,u[i].y);
}
for (i=0;i<NUM_UNITS;i++)
if (u[i].alive && !u[i].king) {
dc->color=BLACK;
GrLine(dc,u[i].x,u[i].y,u[u[i].link].x,u[u[i].link].y);
if (Blink) {
dc->color=BLUE;
dc->pen_width=6;
GrPlot3(dc,(u[i].x+u[u[i].link].x)>>1,(u[i].y+u[u[i].link].y)>>1,0);
}
}
if (show_start) {
dc->color=LTRED;
GrLine(dc,start_x-4,start_y-4,start_x+4,start_y+4);
GrLine(dc,start_x-4,start_y+4,start_x+4,start_y-4);
GrLine(dc,start_x,start_y,end_x,end_y);
}
if ((num_alive[0]==1 || num_alive[1]==1) && Blink(4)) {
dc->color=BLACK;
GrPrint(dc,(task->pix_width-FONT_WIDTH*9)>>1,
(task->pix_height-FONT_HEIGHT)>>1,"Game Over");
}
}
Unit *FindUnit(I64 x,I64 y,I64 player)
{
I64 i,dd,best_dd=MAX_I64;
Unit *result=NULL;
for (i=0;i<NUM_UNITS;i++) {
if (u[i].player==player && u[i].alive) {
dd=SqrI64(u[i].x-x)+SqrI64(u[i].y-y);
if (dd<best_dd) {
best_dd=dd;
result=&u[i];
}
}
}
return result;
}
U0 CheckForKills(I64 x1,I64 y1,I64 player)
{
I64 i,j,x2,y2,dd;
Bool found;
for (i=0;i<NUM_UNITS;i++) {
if (u[i].player!=player && u[i].alive && !u[i].king) {
x2=(u[i].x+u[u[i].link].x)>>1;
y2=(u[i].y+u[u[i].link].y)>>1;
dd=SqrI64(x2-x1)+SqrI64(y2-y1);
if (dd<=(CIRCLE_RAD+2)*(CIRCLE_RAD+2)) {
u[i].alive=FALSE;
Snd(500);Sleep(100);Snd(0);Sleep(25);
num_alive[u[i].player]--;
do {
found=FALSE;
for (j=0;j<NUM_UNITS;j++)
if (u[j].alive && u[j].player!=player && !u[j].king &&
!u[u[j].link].alive) {
found=TRUE;
u[j].alive=FALSE;
Snd(500);Sleep(100);Snd(0);Sleep(25);
num_alive[u[j].player]--;
}
} while (found);
}
}
}
}
Bool MoveUnit(Unit *tempu,I64 x2,I64 y2)
{
I64 i,r,c,r2,c2,x=start_x,y=start_y;
S2W(&x2,&y2);
c2=x2; r2=y2;
S2Circle(&c2,&r2);
for (i=0;i<MOVE_CIRCLES+1;i++) {
c=x; r=y;
S2Circle(&c,&r);
if (c==c2 && r==r2) {
end_x=tempu->x=x2;
end_y=tempu->y=y2;
return TRUE;
}
if (r2!=r) {
if (r&1) {
if (c<c2) c++;
} else {
if (c>c2) c--;
}
}
if (r2>r) {
x=c; y=++r;
Circle2S(&x,&y);
} else if (r2<r) {
x=c; y=--r;
Circle2S(&x,&y);
} else if (c2>c) {
x=++c; y=r;
Circle2S(&x,&y);
} else if (c2<c) {
x=--c; y=r;
Circle2S(&x,&y);
}
}
return FALSE;
}
CDC *DrawHexMap(I64 *_w,I64 *_h)
{
CDC *dc=DCNew(*_w,*_h);
I64 i,j,x,y;
*_w=(dc->width-BORDER*2-CIRCLE_RAD)/(CIRCLE_RAD*2);
*_h=(dc->height-BORDER*2)/(CIRCLE_RAD*2);
DCFill(dc,WHITE);
dc->color=LTGRAY;
for (j=0;j<*_h;j++) {
for (i=0;i<*_w;i++) {
y=j*CIRCLE_RAD*2+BORDER+CIRCLE_RAD;
x=i*CIRCLE_RAD*2+BORDER+CIRCLE_RAD;
if (j&1) x+=CIRCLE_RAD;
S2W(&x,&y);
GrCircle(dc,x,y,CIRCLE_RAD);
}
}
*_w*=CIRCLE_RAD*2;
*_h*=CIRCLE_RAD*2;
return dc;
}
U0 Init()
{
I64 i,j,dd,best_dd,best,w=Fs->pix_width,h=Fs->pix_height;
map_dc=DrawHexMap(&w,&h);
cur_player=0;
for (i=0;i<NUM_UNITS/2;i++) {
u[i].num=i;
u[i+NUM_UNITS/2].num=i+NUM_UNITS/2;
u[i].y=RandU32%h;
u[i+NUM_UNITS/2].y=h-1-u[i].y;
j=u[i].y/(CIRCLE_RAD*2);
u[i].y+=BORDER;
u[i+NUM_UNITS/2].y+=BORDER;
if (!i)
u[i].x=CIRCLE_RAD;
else
u[i].x=RandU32%((w-2*BORDER-CIRCLE_RAD*2)/2)+CIRCLE_RAD*2;
u[i+NUM_UNITS/2].x=w-1-u[i].x;
if (j&1) {
u[i].x+=CIRCLE_RAD;
u[i+NUM_UNITS/2].x+=CIRCLE_RAD;
}
u[i].x+=BORDER;
u[i+NUM_UNITS/2].x+=BORDER;
S2W(&u[i].x,&u[i].y);
S2W(&u[i+NUM_UNITS/2].x,&u[i+NUM_UNITS/2].y);
u[i].player=0;
u[i+NUM_UNITS/2].player=1;
u[i].alive=TRUE;
u[i+NUM_UNITS/2].alive=TRUE;
if (!i) {
u[i].color=LTCYAN;
u[i+NUM_UNITS/2].color=LTPURPLE;
u[i].king=TRUE;
u[i+NUM_UNITS/2].king=TRUE;
} else {
u[i].color=CYAN;
u[i+NUM_UNITS/2].color=PURPLE;
u[i].king=FALSE;
u[i+NUM_UNITS/2].king=FALSE;
}
}
for (i=0;i<NUM_UNITS/2;i++) {
if (!u[i].king) {
best_dd=MAX_I64;
for (j=0;j<NUM_UNITS/2;j++) {
if (i!=j) {
dd=SqrI64(u[i].x-u[j].x)+SqrI64(u[i].y-u[j].y);
if (u[j].x<u[i].x && dd<best_dd) {
best_dd=dd;
best=j;
}
}
}
u[i].link=best;
u[i+NUM_UNITS/2].link=best+NUM_UNITS/2;
}
}
num_alive[0]=NUM_UNITS/2;
num_alive[1]=NUM_UNITS/2;
}
U0 CleanUp()
{
DCDel(map_dc);
}
U0 TreeCheckers()
{
I64 msg_code,a1,a2,ch,sc;
Unit *tempu;
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Preempt(OFF);
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}"
"Play {"
" Restart(,'\n');"
"}"
);
WinMax;
WinBorder;
AutoComplete;
Preempt(OFF);
DocCursor;
DocClear;
PopUpOk("Step on the link mid points.\n"
"Make a computer player or\n"
"modify the rules.\n");
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_BORDER-WIF_FOCUS_TASK_MENU;
try {
cn_start:
Init;
tempu=NULL;
show_start=FALSE;
Fs->draw_it=&DrawIt;
while (TRUE) {
msg_code=GetMsg(&a1,&a2,1<<MSG_KEY_DOWN+1<<MSG_IP_L_DOWN+1<<MSG_IP_L_UP+1<<MSG_IP_MOVE);
switch (msg_code) {
case MSG_KEY_DOWN:
switch (a1) {
case '\n':
CleanUp;
goto cn_start;
case CH_ESC:
case CH_SHIFT_ESC:
goto cn_done;
}
break;
case MSG_IP_L_DOWN:
if (num_alive[0]>1 && num_alive[1]>1) {
tempu=FindUnit(a1,a2,cur_player);
end_x=start_x=tempu->x;
end_y=start_y=tempu->y;
show_start=TRUE;
}
break;
case MSG_IP_MOVE:
if (tempu)
MoveUnit(tempu,a1,a2);
break;
case MSG_IP_L_UP:
MoveUnit(tempu,a1,a2);
CheckForKills(tempu->x,tempu->y,cur_player);
show_start=FALSE;
tempu=NULL;
cur_player=1-cur_player;
break;
}
}
cn_done:
GetMsg(,,1<<MSG_KEY_UP);
} catch
PutExcept;
SettingsPop;
CleanUp;
MenuPop;
}
TreeCheckers;
+41 -44
View File
@@ -445,25 +445,25 @@ U0 Init()
U0 Varoom()
{
I64 ch,sc;
I64 sc;
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}"
"Play {"
" Restart(,'\n');"
" Accelerator(,,SC_CURSOR_UP);"
" Break(,,SC_CURSOR_DOWN);"
" Left(,,SC_CURSOR_LEFT);"
" Right(,,SC_CURSOR_RIGHT);"
"}"
);
SettingsPush(Fs,TSF_SAME_SONG); //See $LK,"SettingsPush",A="MN:SettingsPush"$
"File {"
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}"
"Play {"
" Restart(,'\n');"
" Accelerator(,,SC_CURSOR_UP);"
" Break(,,SC_CURSOR_DOWN);"
" Left(,,SC_CURSOR_LEFT);"
" Right(,,SC_CURSOR_RIGHT);"
"}"
);
SettingsPush(,TSF_SAME_SONG); //See $LK,"SettingsPush",A="MN:SettingsPush"$
try {
Fs->text_attr=YELLOW<<4+BLUE;
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_GRAB_SCROLL-WIF_FOCUS_TASK_MENU;
WordStat;
AutoComplete;
WinMax;
WinBorder;
Preempt(OFF);
@@ -472,38 +472,35 @@ U0 Varoom()
DocClear;
Fs->draw_it=&DrawIt;
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
while (TRUE) {
while (ScanKey(&ch,&sc))
switch (ch) {
case 0:
switch (sc.u8[0]) {
case SC_CURSOR_LEFT:
c[0].é-=ă/100;
break;
case SC_CURSOR_RIGHT:
c[0].é+=ă/100;
break;
case SC_CURSOR_UP:
c[0].speed+=3;
break;
case SC_CURSOR_DOWN:
c[0].speed-=3;
break;
}
break;
case '\n':
Init;
break;
case CH_SHIFT_ESC:
case CH_ESC:
goto vr_done;
}
WinMgrSync;
}
while (TRUE)
switch (GetKey(&sc)) {
case 0:
switch (sc.u8[0]) {
case SC_CURSOR_LEFT:
c[0].é-=ă/100;
break;
case SC_CURSOR_RIGHT:
c[0].é+=ă/100;
break;
case SC_CURSOR_UP:
c[0].speed+=3;
break;
case SC_CURSOR_DOWN:
c[0].speed-=3;
break;
}
break;
case '\n':
Init;
break;
case CH_SHIFT_ESC:
case CH_ESC:
goto vr_done;
}
vr_done: //Don't goto out of try
} catch
Fs->catch_except=TRUE;
SettingsPop(Fs,TSF_SAME_SONG);
SettingsPop(,TSF_SAME_SONG);
MenuPop;
AcctRegWriteBranch("TempleOS/Varoom","F64 best_score=%5.4f;\n",best_score);
}
+206 -110
View File
@@ -2,16 +2,35 @@ AcctRegSetDftEntry("TempleOS/Wenceslas","F64 best_score=9999;\n");
AcctRegExeBranch("TempleOS/Wenceslas");
#define BORDER 5
#define KING_STEP 4
$SP,"<1>",BI=1$
#define KING_STEP 6
$SP,"<2>",BI=2$
$SP,"<1>",BI=1$
$SP,"<2>",BI=2$
$SP,"<3>",BI=3$
$SP,"<4>",BI=4$
$SP,"<5>",BI=5$
$SP,"<6>",BI=6$
@@ -22,19 +41,19 @@ AcctRegExeBranch("TempleOS/Wenceslas");
$SP,"<3>",BI=3$
$SP,"<7>",BI=7$
$SP,"<4>",BI=4$
$SP,"<8>",BI=8$
$SP,"<5>",BI=5$
$SP,"<9>",BI=9$
@@ -53,14 +72,18 @@ AcctRegExeBranch("TempleOS/Wenceslas");
$SP,"<6>",BI=6$
$SP,"<10>",BI=10$
$SP,"<7>",BI=7$
$SP,"<11>",BI=11$
CSprite *king_imgs[4]={$IB,"<2>",BI=2$,$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$};
CSprite *peasant_imgs[4]={$IB,"<5>",BI=5$,$IB,"<4>",BI=4$,$IB,"<5>",BI=5$,$IB,"<6>",BI=6$};
#define NUM_FLAKES 0x8000
class Flake
@@ -76,10 +99,12 @@ class Tree
} trees[NUM_TREES];
I64 snow_x,snow_y;
I64 king_x,king_y,not_stopped_cnt;
F64 king_é,t0,tf,door_open_t0;
I64 king_x,king_y,king_mS,king_phase,
not_stopped_cnt;
F64 king_timeout,king_é,t0,tf,door_open_t0;
I64 animate_mS,animate_phase;
#define NUM_PEASANTS 16
#define NUM_PEASANTS 10
class Peasant
{
Peasant *next,*last;
@@ -98,7 +123,8 @@ U0 DrawIt(CTask *task,CDC *dc)
{
I64 r[16],i,w=task->pix_width,h=task->pix_height;
U8 *img;
Step *temps;
CSprite *temps;
Step *tempst;
Peasant *tempp;
F64 tt;
Bool old_preempt=Preempt(OFF);
@@ -108,43 +134,45 @@ U0 DrawIt(CTask *task,CDC *dc)
if (trees[i].y<=h/2) {//Draw trees behind house
if (trees[i].fire_frame_index) {
if (trees[i].fire_frame_index++&1)
img=$IB,"<4>",BI=4$;
img=$IB,"<8>",BI=8$;
else
img=$IB,"<5>",BI=5$;
img=$IB,"<9>",BI=9$;
} else
img=$IB,"<3>",BI=3$;
img=$IB,"<7>",BI=7$;
Sprite3(dc,trees[i].x,trees[i].y,0,img);
}
}
Sprite3(dc,w/2,h/2,0,$IB,"<6>",BI=6$);
Sprite3(dc,w/2,h/2,0,$IB,"<10>",BI=10$);
if (tS<door_open_t0+1.0)
Sprite3(dc,w/2,h/2,0,$IB,"<7>",BI=7$);
Sprite3(dc,w/2,h/2,0,$IB,"<11>",BI=11$);
for (i=0;i<NUM_TREES;i++) {
if (trees[i].y>h/2) {//Draw trees in front of house
if (trees[i].fire_frame_index) {
if (trees[i].fire_frame_index++&1)
img=$IB,"<4>",BI=4$;
img=$IB,"<8>",BI=8$;
else
img=$IB,"<5>",BI=5$;
img=$IB,"<9>",BI=9$;
} else
img=$IB,"<3>",BI=3$;
img=$IB,"<7>",BI=7$;
Sprite3(dc,trees[i].x,trees[i].y,0,img);
}
}
temps=step_root.next;
while (temps!=&step_root) {
if (tS-temps->t0<2.0)
tempst=step_root.next;
while (tempst!=&step_root) {
if (tS-tempst->t0<2.0)
dc->color=DKGRAY;
else
dc->color=LTGRAY;
dc->pen_width=2;
GrPlot3(dc,temps->x,temps->y,0);
temps=temps->next;
dc->pen_width=4;
GrPlot3(dc,tempst->x,tempst->y,0);
tempst=tempst->next;
}
DCAllocDepthBuf(dc);
dc->flags|=DCF_TRANSFORMATION;
dc->pen_width=1;
tempp=peasant_root.next;
while (tempp!=&peasant_root) {
@@ -152,25 +180,39 @@ U0 DrawIt(CTask *task,CDC *dc)
GrRotYEqu(r,tempp->é+ã/2);
GrRotXEqu(r,ã/6);
if (tempp->stopped)
dc->color=LTCYAN;
else
dc->color=CYAN;
SpriteMat3B(dc,tempp->x,tempp->y,0,$IB,"<2>",BI=2$,r);
SpriteMat3B(dc,tempp->x,tempp->y,GR_Z_ALL,peasant_imgs[0],r);
else {
temps=SpriteInterpolate(
peasant_imgs[ animate_phase &3],
peasant_imgs[(animate_phase+1)&3],
Saw(animate_mS/250.0,1.0));
SpriteMat3B(dc,tempp->x,tempp->y,GR_Z_ALL,temps,r);
Free(temps);
}
tempp=tempp->next;
}
dc->pen_width=1;
GrIdentEqu(r);
GrRotYEqu(r,king_é+ã/2);
GrRotXEqu(r,ã/6);
SpriteMat3B(dc,king_x,king_y,0,$IB,"<1>",BI=1$,r);
if (tS>king_timeout)
SpriteMat3B(dc,king_x,king_y,GR_Z_ALL,king_imgs[0],r);
else {
temps=SpriteInterpolate(
king_imgs[ king_phase &3],
king_imgs[(king_phase+1)&3],
Saw(king_mS/250.0,1.0));
SpriteMat3B(dc,king_x,king_y,GR_Z_ALL,temps,r);
Free(temps);
}
dc->pen_width=1;
dc->color=WHITE;
for (i=0;i<NUM_FLAKES;i++)
GrPlot(dc,(flakes[i].x+snow_x)%task->pix_width,
(flakes[i].y+snow_y)%task->pix_height);
(flakes[i].y+snow_y)%task->pix_height);
if (tf) {
dc->color=LTRED;
if (Blink)
@@ -181,12 +223,12 @@ U0 DrawIt(CTask *task,CDC *dc)
}
dc->color=LTBLUE;
GrPrint(dc,0,0,"Freezing Peasants:%d Time:%3.2f Best:%3.2f",
not_stopped_cnt,tt-t0,best_score);
not_stopped_cnt,tt-t0,best_score);
Preempt(old_preempt);
}
U0 StepNew(CTask *task,I64 x,I64 y,F64 é,Bool king)
U0 StepNew(CTask *task,I64 x,I64 y,F64 é,Bool left_right,Bool king)
{
Step *temps;
@@ -198,17 +240,29 @@ U0 StepNew(CTask *task,I64 x,I64 y,F64
QueIns(temps,king_step_root.last);
}
temps=MAlloc(sizeof(Step),task);
temps->x=x-3.5*Sin(é)+1.0*Cos(é);
temps->y=y+3.5*Cos(é)+1.0*Sin(é);
temps->t0=tS;
QueIns(temps,step_root.last);
temps=MAlloc(sizeof(Step),task);
temps->x=x+3.5*Sin(é)-1.0*Cos(é);
temps->y=y-3.5*Cos(é)-1.0*Sin(é);
temps->t0=tS;
QueIns(temps,step_root.last);
if (left_right) {
temps=MAlloc(sizeof(Step),task);
temps->x=x-3.5*Sin(é)+2.0*Cos(é);
temps->y=y+3.5*Cos(é)+2.0*Sin(é);
temps->t0=tS;
QueIns(temps,step_root.last);
temps=MAlloc(sizeof(Step),task);
temps->x=x-3.5*Sin(é)+5.0*Cos(é);
temps->y=y+3.5*Cos(é)+5.0*Sin(é);
temps->t0=tS;
QueIns(temps,step_root.last);
} else {
temps=MAlloc(sizeof(Step),task);
temps->x=x+3.5*Sin(é)+0.0*Cos(é);
temps->y=y-3.5*Cos(é)+0.0*Sin(é);
temps->t0=tS;
QueIns(temps,step_root.last);
temps=MAlloc(sizeof(Step),task);
temps->x=x+3.5*Sin(é)+3.0*Cos(é);
temps->y=y-3.5*Cos(é)+3.0*Sin(é);
temps->t0=tS;
QueIns(temps,step_root.last);
}
}
U0 Init()
@@ -223,7 +277,7 @@ U0 Init()
flakes[i].y=RandU16;
}
SpriteExtents($IB,"<3>",BI=3$,&min_x,&max_x,&min_y,&max_y);
SpriteExtents($IB,"<7>",BI=7$,&min_x,&max_x,&min_y,&max_y);
for (i=0;i<NUM_TREES;i++) {
trees[i].x=RandU16%(w-2*BORDER-(max_x-min_x+1))+BORDER-min_x;
trees[i].y=RandU16%(h-2*BORDER-(max_y-min_y+1))+BORDER-min_y;
@@ -233,7 +287,7 @@ U0 Init()
QueInit(&step_root);
QueInit(&king_step_root);
SpriteExtents($IB,"<1>",BI=1$,&min_x,&max_x,&min_y,&max_y);
SpriteExtents($IB,"<12>",BI=12$,&min_x,&max_x,&min_y,&max_y);
QueInit(&peasant_root);
for (i=0;i<NUM_PEASANTS;i++) {
tempp=MAlloc(sizeof(Peasant));
@@ -244,7 +298,11 @@ U0 Init()
tempp->stopped=FALSE;
QueIns(tempp,peasant_root.last);
}
animate_phase=0;
animate_mS=0;
king_phase=0;
king_mS=0;
king_timeout=0;
king_x=w/2;
king_y=h/2;
king_é=-ã/2;
@@ -281,7 +339,7 @@ U0 AnimateTask(I64)
{//Preempt off by default after spawned.
Step *temps,*temps1;
Peasant *tempp;
I64 i,animate_cnt=0,w,h;
I64 i,w,h;
while (TRUE) {
w=Fs->parent_task->pix_width;
h=Fs->parent_task->pix_height;
@@ -289,7 +347,7 @@ U0 AnimateTask(I64)
temps=step_root.next;
while (temps!=&step_root) {
temps1=temps->next;
if (tS-temps->t0>4.0) {
if (tS-temps->t0>5.0) {
QueRem(temps);
Free(temps);
}
@@ -299,7 +357,7 @@ U0 AnimateTask(I64)
temps=king_step_root.next;
while (temps!=&king_step_root) {
temps1=temps->next;
if (tS-temps->t0>4.0) {
if (tS-temps->t0>3.0) {
QueRem(temps);
Free(temps);
}
@@ -333,8 +391,8 @@ U0 AnimateTask(I64)
tempp->x+=3*Cos(tempp->é)/100;
tempp->y+=3*Sin(tempp->é)/100;
}
if (!(animate_cnt&511))
StepNew(Fs->parent_task,tempp->x,tempp->y,tempp->é,FALSE);
if (!animate_mS && animate_phase&1)
StepNew(Fs->parent_task,tempp->x,tempp->y,tempp->é,animate_phase&2,FALSE);
not_stopped_cnt++;
}
}
@@ -354,7 +412,18 @@ U0 AnimateTask(I64)
snow_x+=RandU16%3-1;
snow_y+=1-SignI64(RandU16&3);
Sleep(1);
animate_cnt++;
animate_mS++;
if (animate_mS>=250) {
animate_mS=0;
animate_phase=(animate_phase+1)&3;
}
if (tS<king_timeout) {
king_mS++;
if (king_mS>=250) {
king_mS=0;
king_phase|=1;
}
}
}
}
@@ -384,19 +453,19 @@ U0 Wenceslas()
I64 sc;
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}"
"Play {"
" Restart(,'\n');"
" BurnTree(,CH_SPACE);"
" Up(,,SC_CURSOR_UP);"
" Down(,,SC_CURSOR_DOWN);"
" Left(,,SC_CURSOR_LEFT);"
" Right(,,SC_CURSOR_RIGHT);"
"}"
);
"File {"
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}"
"Play {"
" Restart(,'\n');"
" BurnTree(,CH_SPACE);"
" Up(,,SC_CURSOR_UP);"
" Down(,,SC_CURSOR_DOWN);"
" Left(,,SC_CURSOR_LEFT);"
" Right(,,SC_CURSOR_RIGHT);"
"}"
);
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
WinMax;
@@ -432,7 +501,7 @@ Through the rude wind's wild lament
And the bitter weather
");
PopUpOk("
PopUpOk("
\"Sire, the night is darker now
And the wind blows stronger
Fails my heart, I know not how,
@@ -452,7 +521,7 @@ Ye who now will bless the poor
Shall yourselves find blessing
");
PopUpOk("
PopUpOk("
$$PURPLE$$$$TX+CX,\"Winceslas Game\"$$$$FG$$
Start fires by pressing $$GREEN$$<SPACE>$$FG$$
@@ -463,7 +532,7 @@ Lead peasants to fires.
Init;
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
WordStat;
AutoComplete;
DocCursor;
DocClear;
@@ -483,29 +552,32 @@ Lead peasants to fires.
break;
case 0:
switch (sc.u8[0]) {
case SC_CURSOR_RIGHT:
if (king_x+KING_STEP<Fs->pix_width-BORDER)
king_x+=KING_STEP;
king_é=0;
StepNew(Fs,king_x,king_y,king_é,TRUE);
break;
case SC_CURSOR_LEFT:
if (king_x-KING_STEP>=BORDER)
king_x-=KING_STEP;
king_é=ă;
StepNew(Fs,king_x,king_y,king_é,TRUE);
break;
case SC_CURSOR_DOWN:
if (king_y+KING_STEP<Fs->pix_height-BORDER)
king_y+=KING_STEP;
king_é=-ă/2;
StepNew(Fs,king_x,king_y,king_é,TRUE);
break;
case SC_CURSOR_UP:
if (king_y-KING_STEP>=BORDER)
king_y-=KING_STEP;
king_é=ă/2;
StepNew(Fs,king_x,king_y,king_é,TRUE);
sub_switch_start:
case SC_CURSOR_RIGHT:
if (king_x+KING_STEP<Fs->pix_width-BORDER)
king_x+=KING_STEP;
king_é=0;
break;
case SC_CURSOR_LEFT:
if (king_x-KING_STEP>=BORDER)
king_x-=KING_STEP;
king_é=ă;
break;
case SC_CURSOR_DOWN:
if (king_y+KING_STEP<Fs->pix_height-BORDER)
king_y+=KING_STEP;
king_é=-ă/2;
break;
case SC_CURSOR_UP:
if (king_y-KING_STEP>=BORDER)
king_y-=KING_STEP;
king_é=ă/2;
break;
sub_switch_end:
king_mS=0;
king_phase=(king_phase+2)&2;
StepNew(Fs,king_x,king_y,king_é,king_phase&2,TRUE);
king_timeout=tS+0.5;
break;
}
}
@@ -520,7 +592,7 @@ ws_done:
}
Wenceslas;
y
y
þÿÿÿÚÿÿÿ
Êÿÿÿ
þÿÿÿÚÿÿÿ äÿÿÿ
@@ -544,7 +616,7 @@ Wenceslas;
ÿÿÿ
Ìÿÿÿ Ìÿÿÿ
üÿÿÿÔÿÿÿèÿÿÿÚÿÿÿ
Ö˙˙˙*
Ö˙˙˙ *
ðÿÿÿüÿÿÿ
ðÿÿÿ
ðÿÿÿèÿÿÿ
@@ -561,14 +633,7 @@ Wenceslas;
üÿÿÿèÿÿÿüÿÿÿòÿÿÿ
äÿÿÿêÿÿÿ
æÿÿÿþÿÿÿîÿÿÿ
ě˙˙˙ň˙˙˙x
ţ˙˙˙č˙˙˙ü˙˙˙ň˙˙˙
đ˙˙˙č˙˙˙
đ˙˙˙ü˙˙˙
đ˙˙˙
ţ˙˙˙ň˙˙˙ü˙˙˙ć˙˙˙
ţ˙˙˙ć˙˙˙ŕ˙˙˙
ć˙˙˙đ˙˙˙ă
ě˙˙˙ň˙˙˙ă
öÿÿÿðÿÿÿ
øÿÿÿ
ôÿÿÿ
@@ -599,7 +664,7 @@ Wenceslas;
üÿÿÿ
üÿÿÿøÿÿÿ
úÿÿÿøÿÿÿúÿÿÿðÿÿÿ
ň˙˙˙ě˙˙˙ô
ň˙˙˙ě˙˙˙ ô
öÿÿÿðÿÿÿ
øÿÿÿ
ôÿÿÿ
@@ -631,4 +696,35 @@ Wenceslas;
øÿÿÿðÿÿÿøÿÿÿ
ôÿÿÿ
ü˙˙˙ŇbźžÎ˙˙˙h˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Line truncated
ü˙˙˙
ŇbÎ˙˙˙h˙˙˙źž˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Line truncated

     
 
  
      ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmokĘp¨Ý˙˙˙ý˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙Ý˙˙˙á˙˙˙ý˙˙˙á˙˙˙á˙˙˙ý˙˙˙ű˙˙˙á˙˙˙ý˙˙˙đ˙˙˙ý˙˙˙ű˙˙˙đ˙˙˙ý˙˙˙á˙˙˙ű˙˙˙á˙˙˙đ˙˙˙ű˙˙˙đ˙˙˙á˙˙˙â˙˙˙ç˙˙˙ü˙˙˙č˙˙˙ü˙˙˙â˙˙˙ă˙˙˙č˙˙˙ý˙˙˙é˙˙˙ý˙˙˙ç˙˙˙ü˙˙˙č˙˙˙ü˙˙˙í˙˙˙ů˙˙˙í˙˙˙ů˙˙˙č˙˙˙ý˙˙˙é˙˙˙ý˙˙˙í˙˙˙ú˙˙˙î˙˙˙ú˙˙˙í˙˙˙ů˙˙˙í˙˙˙ů˙˙˙ đ˙˙˙ř˙˙˙đ˙˙˙ř˙˙˙í˙˙˙ú˙˙˙î˙˙˙ú˙˙˙ đ˙˙˙ů˙˙˙ń˙˙˙ů˙˙˙ű˙˙˙ă˙˙˙ţ˙˙˙ú˙˙˙ă˙˙˙ţ˙˙˙ú˙˙˙é˙˙˙ř˙˙˙é˙˙˙ű˙˙˙á˙˙˙ú˙˙˙á˙˙˙ú˙˙˙ç˙˙˙ř˙˙˙ç˙˙˙ú˙˙˙é˙˙˙ř˙˙˙é˙˙˙ů˙˙˙í˙˙˙ř˙˙˙í˙˙˙ú˙˙˙ç˙˙˙ř˙˙˙ç˙˙˙ů˙˙˙ę˙˙˙ ř˙˙˙ę˙˙˙ ů˙˙˙ě˙˙˙ř˙˙˙ě˙˙˙ů˙˙˙î˙˙˙ ÷˙˙˙î˙˙˙ ů˙˙˙ë˙˙˙ř˙˙˙ë˙˙˙ů˙˙˙ě˙˙˙ ÷˙˙˙ě˙˙˙ đ˙˙˙ţ˙˙˙ń˙˙˙˙˙˙˙ő˙˙˙ö˙˙˙î˙˙˙ď˙˙˙ó˙˙˙ô˙˙˙ő˙˙˙ö˙˙˙ü˙˙˙ý˙˙˙ó˙˙˙ô˙˙˙ú˙˙˙ű˙˙˙ţ˙˙˙ţ˙˙˙ü˙˙˙ ü˙˙˙ ü˙˙˙ü˙˙˙ú˙˙˙ ú˙˙˙ ţ˙˙˙ď˙˙˙ţ˙˙˙ü˙˙˙ď˙˙˙˙˙˙˙ţ˙˙˙ô˙˙˙ú˙˙˙ű˙˙˙ô˙˙˙ú˙˙˙ţ˙˙˙đ˙˙˙ü˙˙˙đ˙˙˙ţ˙˙˙ő˙˙˙ű˙˙˙ű˙˙˙ő˙˙˙ü˙˙˙ţ˙˙˙ô˙˙˙ú˙˙˙ű˙˙˙ô˙˙˙ú˙˙˙ý˙˙˙ů˙˙˙ő˙˙˙ű˙˙˙ů˙˙˙ö˙˙˙ţ˙˙˙ő˙˙˙ű˙˙˙ű˙˙˙ő˙˙˙ü˙˙˙ý˙˙˙ú˙˙˙÷˙˙˙ű˙˙˙ú˙˙˙ř˙˙˙ý˙˙˙ű˙˙˙ó˙˙˙ű˙˙˙ű˙˙˙ó˙˙˙ý˙˙˙ř˙˙˙ú˙˙˙ř˙˙˙ý˙˙˙ř˙˙˙ő˙˙˙ű˙˙˙ř˙˙˙ő˙˙˙ý˙˙˙ý˙˙˙ú˙˙˙ú˙˙˙ý˙˙˙ú˙˙˙ 

     
 
  
      ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmokĘp¨Ý˙˙˙ý˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙Ý˙˙˙á˙˙˙ý˙˙˙á˙˙˙á˙˙˙ý˙˙˙ű˙˙˙á˙˙˙ý˙˙˙đ˙˙˙ý˙˙˙ű˙˙˙đ˙˙˙ý˙˙˙á˙˙˙ű˙˙˙á˙˙˙đ˙˙˙ű˙˙˙đ˙˙˙á˙˙˙ţ˙˙˙â˙˙˙ţ˙˙˙č˙˙˙ţ˙˙˙é˙˙˙ţ˙˙˙á˙˙˙â˙˙˙č˙˙˙é˙˙˙č˙˙˙ţ˙˙˙é˙˙˙ţ˙˙˙ď˙˙˙ţ˙˙˙đ˙˙˙ţ˙˙˙č˙˙˙é˙˙˙ď˙˙˙đ˙˙˙ď˙˙˙˙˙˙˙đ˙˙˙˙˙˙˙ ň˙˙˙˙˙˙˙ó˙˙˙˙˙˙˙ď˙˙˙đ˙˙˙ ň˙˙˙ó˙˙˙ű˙˙˙â˙˙˙ţ˙˙˙ú˙˙˙â˙˙˙ţ˙˙˙ú˙˙˙é˙˙˙ţ˙˙˙ř˙˙˙é˙˙˙ţ˙˙˙ű˙˙˙â˙˙˙ú˙˙˙â˙˙˙ú˙˙˙é˙˙˙ř˙˙˙é˙˙˙ú˙˙˙é˙˙˙ţ˙˙˙ř˙˙˙é˙˙˙ţ˙˙˙ů˙˙˙ď˙˙˙ţ˙˙˙ř˙˙˙ď˙˙˙ţ˙˙˙ú˙˙˙é˙˙˙ř˙˙˙é˙˙˙ů˙˙˙ď˙˙˙ř˙˙˙ď˙˙˙ů˙˙˙ď˙˙˙˙˙˙˙ř˙˙˙ď˙˙˙˙˙˙˙ů˙˙˙ň˙˙˙˙˙˙˙÷˙˙˙ň˙˙˙˙˙˙˙ů˙˙˙ď˙˙˙ř˙˙˙ď˙˙˙ů˙˙˙ň˙˙˙÷˙˙˙ň˙˙˙ď˙˙˙ţ˙˙˙đ˙˙˙ţ˙˙˙ö˙˙˙ţ˙˙˙÷˙˙˙ţ˙˙˙ď˙˙˙đ˙˙˙ö˙˙˙÷˙˙˙ö˙˙˙ţ˙˙˙÷˙˙˙ţ˙˙˙ý˙˙˙ţ˙˙˙ý˙˙˙ţ˙˙˙ö˙˙˙÷˙˙˙ý˙˙˙ý˙˙˙˙˙˙˙ţ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ý˙˙˙ţ˙˙˙ý˙˙˙˙˙˙˙ý˙˙˙ý˙˙˙ţ˙˙˙đ˙˙˙ţ˙˙˙ü˙˙˙đ˙˙˙ţ˙˙˙ţ˙˙˙ö˙˙˙ţ˙˙˙ű˙˙˙ö˙˙˙ţ˙˙˙ţ˙˙˙đ˙˙˙ü˙˙˙đ˙˙˙ţ˙˙˙ö˙˙˙ű˙˙˙ö˙˙˙ţ˙˙˙ö˙˙˙ţ˙˙˙ű˙˙˙ö˙˙˙ţ˙˙˙ý˙˙˙ý˙˙˙ţ˙˙˙ű˙˙˙ý˙˙˙ţ˙˙˙ţ˙˙˙ö˙˙˙ű˙˙˙ö˙˙˙ý˙˙˙ý˙˙˙ű˙˙˙ý˙˙˙ý˙˙˙˙˙˙˙ţ˙˙˙ű˙˙˙˙˙˙˙ţ˙˙˙ý˙˙˙˙˙˙˙ú˙˙˙˙˙˙˙ý˙˙˙ý˙˙˙ţ˙˙˙ű˙˙˙ý˙˙˙ţ˙˙˙ý˙˙˙ý˙˙˙ú˙˙˙ý˙˙˙ 

     
 
  
      ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmokĘp¨Ý˙˙˙ý˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙Ý˙˙˙á˙˙˙ý˙˙˙á˙˙˙á˙˙˙ý˙˙˙ű˙˙˙á˙˙˙ý˙˙˙đ˙˙˙ý˙˙˙ű˙˙˙đ˙˙˙ý˙˙˙á˙˙˙ű˙˙˙á˙˙˙đ˙˙˙ű˙˙˙đ˙˙˙â˙˙˙ţ˙˙˙ă˙˙˙˙˙˙˙č˙˙˙é˙˙˙ŕ˙˙˙á˙˙˙ç˙˙˙č˙˙˙é˙˙˙ę˙˙˙ě˙˙˙í˙˙˙ć˙˙˙ç˙˙˙ę˙˙˙ë˙˙˙ ě˙˙˙í˙˙˙ í˙˙˙ î˙˙˙ ę˙˙˙ë˙˙˙ ě˙˙˙ í˙˙˙ ű˙˙˙á˙˙˙˙˙˙˙ú˙˙˙á˙˙˙ú˙˙˙č˙˙˙ű˙˙˙ř˙˙˙č˙˙˙ü˙˙˙ű˙˙˙â˙˙˙ú˙˙˙â˙˙˙ú˙˙˙č˙˙˙ý˙˙˙ř˙˙˙č˙˙˙ţ˙˙˙ú˙˙˙č˙˙˙ű˙˙˙ř˙˙˙č˙˙˙ü˙˙˙ů˙˙˙í˙˙˙ř˙˙˙ř˙˙˙í˙˙˙ů˙˙˙ú˙˙˙č˙˙˙ý˙˙˙ř˙˙˙č˙˙˙ţ˙˙˙ů˙˙˙î˙˙˙ú˙˙˙ř˙˙˙î˙˙˙ű˙˙˙ů˙˙˙í˙˙˙ů˙˙˙ř˙˙˙í˙˙˙ú˙˙˙ů˙˙˙đ˙˙˙ř˙˙˙÷˙˙˙đ˙˙˙ř˙˙˙ů˙˙˙î˙˙˙ú˙˙˙ř˙˙˙î˙˙˙ú˙˙˙ů˙˙˙ń˙˙˙ř˙˙˙÷˙˙˙ń˙˙˙ů˙˙˙î˙˙˙˙˙˙˙ď˙˙˙˙˙˙˙ó˙˙˙ú˙˙˙ô˙˙˙ú˙˙˙đ˙˙˙ń˙˙˙ő˙˙˙ü˙˙˙ö˙˙˙ü˙˙˙ó˙˙˙ú˙˙˙ô˙˙˙ú˙˙˙ř˙˙˙ő˙˙˙ů˙˙˙ő˙˙˙ő˙˙˙ü˙˙˙ö˙˙˙ü˙˙˙ú˙˙˙÷˙˙˙ű˙˙˙÷˙˙˙ú˙˙˙ó˙˙˙ű˙˙˙ô˙˙˙˙˙˙˙ř˙˙˙ř˙˙˙ř˙˙˙ő˙˙˙ů˙˙˙ő˙˙˙ý˙˙˙ů˙˙˙ý˙˙˙ú˙˙˙ţ˙˙˙ń˙˙˙˙˙˙˙ü˙˙˙ń˙˙˙˙˙˙˙ţ˙˙˙ö˙˙˙ű˙˙˙ö˙˙˙ţ˙˙˙î˙˙˙ü˙˙˙î˙˙˙ţ˙˙˙ó˙˙˙ű˙˙˙ó˙˙˙ţ˙˙˙ő˙˙˙ű˙˙˙ő˙˙˙ý˙˙˙ü˙˙˙ű˙˙˙ü˙˙˙ţ˙˙˙ô˙˙˙ű˙˙˙ô˙˙˙ý˙˙˙ú˙˙˙ű˙˙˙ú˙˙˙ý˙˙˙ţ˙˙˙ű˙˙˙˙˙˙˙ý˙˙˙ü˙˙˙ ú˙˙˙ý˙˙˙ ý˙˙˙ű˙˙˙ű˙˙˙ü˙˙˙ý˙˙˙ů˙˙˙ ú˙˙˙ú˙˙˙  

     
 
  
      ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmokĘp¨Ý˙˙˙ý˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙Ý˙˙˙á˙˙˙ý˙˙˙á˙˙˙á˙˙˙ý˙˙˙ű˙˙˙á˙˙˙ý˙˙˙đ˙˙˙ý˙˙˙ű˙˙˙đ˙˙˙ý˙˙˙á˙˙˙ű˙˙˙á˙˙˙đ˙˙˙ű˙˙˙đ˙˙˙á˙˙˙ţ˙˙˙â˙˙˙ţ˙˙˙č˙˙˙ţ˙˙˙é˙˙˙ţ˙˙˙á˙˙˙â˙˙˙č˙˙˙é˙˙˙č˙˙˙ţ˙˙˙é˙˙˙ţ˙˙˙ď˙˙˙ţ˙˙˙đ˙˙˙ţ˙˙˙č˙˙˙é˙˙˙ď˙˙˙đ˙˙˙ď˙˙˙˙˙˙˙đ˙˙˙˙˙˙˙ ň˙˙˙˙˙˙˙ó˙˙˙˙˙˙˙ď˙˙˙đ˙˙˙ ň˙˙˙ó˙˙˙ű˙˙˙â˙˙˙ţ˙˙˙ú˙˙˙â˙˙˙ţ˙˙˙ú˙˙˙é˙˙˙ţ˙˙˙ř˙˙˙é˙˙˙ţ˙˙˙ű˙˙˙â˙˙˙ú˙˙˙â˙˙˙ú˙˙˙é˙˙˙ř˙˙˙é˙˙˙ú˙˙˙é˙˙˙ţ˙˙˙ř˙˙˙é˙˙˙ţ˙˙˙ů˙˙˙ď˙˙˙ţ˙˙˙ř˙˙˙ď˙˙˙ţ˙˙˙ú˙˙˙é˙˙˙ř˙˙˙é˙˙˙ů˙˙˙ď˙˙˙ř˙˙˙ď˙˙˙ů˙˙˙ď˙˙˙˙˙˙˙ř˙˙˙ď˙˙˙˙˙˙˙ů˙˙˙ň˙˙˙˙˙˙˙÷˙˙˙ň˙˙˙˙˙˙˙ů˙˙˙ď˙˙˙ř˙˙˙ď˙˙˙ů˙˙˙ň˙˙˙÷˙˙˙ň˙˙˙ď˙˙˙ţ˙˙˙đ˙˙˙ţ˙˙˙ö˙˙˙ţ˙˙˙÷˙˙˙ţ˙˙˙ď˙˙˙đ˙˙˙ö˙˙˙÷˙˙˙ö˙˙˙ţ˙˙˙÷˙˙˙ţ˙˙˙ý˙˙˙ţ˙˙˙ý˙˙˙ţ˙˙˙ö˙˙˙÷˙˙˙ý˙˙˙ý˙˙˙˙˙˙˙ţ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ý˙˙˙ţ˙˙˙ý˙˙˙˙˙˙˙ý˙˙˙ý˙˙˙ţ˙˙˙đ˙˙˙ţ˙˙˙ü˙˙˙đ˙˙˙ţ˙˙˙ţ˙˙˙ö˙˙˙ţ˙˙˙ű˙˙˙ö˙˙˙ţ˙˙˙ţ˙˙˙đ˙˙˙ü˙˙˙đ˙˙˙ţ˙˙˙ö˙˙˙ű˙˙˙ö˙˙˙ţ˙˙˙ö˙˙˙ţ˙˙˙ű˙˙˙ö˙˙˙ţ˙˙˙ý˙˙˙ý˙˙˙ţ˙˙˙ű˙˙˙ý˙˙˙ţ˙˙˙ţ˙˙˙ö˙˙˙ű˙˙˙ö˙˙˙ý˙˙˙ý˙˙˙ű˙˙˙ý˙˙˙ý˙˙˙˙˙˙˙ţ˙˙˙ű˙˙˙˙˙˙˙ţ˙˙˙ý˙˙˙˙˙˙˙ú˙˙˙˙˙˙˙ý˙˙˙ý˙˙˙ţ˙˙˙ű˙˙˙ý˙˙˙ţ˙˙˙ý˙˙˙ý˙˙˙ú˙˙˙ý˙˙˙ 

     
 
  
      ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmokĘp¨Ý˙˙˙ý˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙ý˙˙˙á˙˙˙ý˙˙˙Ý˙˙˙ý˙˙˙Ý˙˙˙á˙˙˙ý˙˙˙á˙˙˙á˙˙˙ý˙˙˙ű˙˙˙á˙˙˙ý˙˙˙đ˙˙˙ý˙˙˙ű˙˙˙đ˙˙˙ý˙˙˙á˙˙˙ű˙˙˙á˙˙˙đ˙˙˙ű˙˙˙đ˙˙˙á˙˙˙â˙˙˙ç˙˙˙ü˙˙˙č˙˙˙ü˙˙˙â˙˙˙ă˙˙˙č˙˙˙ý˙˙˙é˙˙˙ý˙˙˙ç˙˙˙ü˙˙˙č˙˙˙ü˙˙˙í˙˙˙ů˙˙˙í˙˙˙ů˙˙˙č˙˙˙ý˙˙˙é˙˙˙ý˙˙˙í˙˙˙ú˙˙˙î˙˙˙ú˙˙˙í˙˙˙ů˙˙˙í˙˙˙ů˙˙˙ đ˙˙˙ř˙˙˙đ˙˙˙ř˙˙˙í˙˙˙ú˙˙˙î˙˙˙ú˙˙˙ đ˙˙˙ů˙˙˙ń˙˙˙ů˙˙˙ű˙˙˙ă˙˙˙ţ˙˙˙ú˙˙˙ă˙˙˙ţ˙˙˙ú˙˙˙é˙˙˙ř˙˙˙é˙˙˙ű˙˙˙á˙˙˙ú˙˙˙á˙˙˙ú˙˙˙ç˙˙˙ř˙˙˙ç˙˙˙ú˙˙˙é˙˙˙ř˙˙˙é˙˙˙ů˙˙˙í˙˙˙ř˙˙˙í˙˙˙ú˙˙˙ç˙˙˙ř˙˙˙ç˙˙˙ů˙˙˙ę˙˙˙ ř˙˙˙ę˙˙˙ ů˙˙˙ě˙˙˙ř˙˙˙ě˙˙˙ů˙˙˙î˙˙˙ ÷˙˙˙î˙˙˙ ů˙˙˙ë˙˙˙ř˙˙˙ë˙˙˙ů˙˙˙ě˙˙˙ ÷˙˙˙ě˙˙˙ đ˙˙˙ţ˙˙˙ń˙˙˙˙˙˙˙ő˙˙˙ö˙˙˙î˙˙˙ď˙˙˙ó˙˙˙ô˙˙˙ő˙˙˙ö˙˙˙ü˙˙˙ý˙˙˙ó˙˙˙ô˙˙˙ú˙˙˙ű˙˙˙ţ˙˙˙ţ˙˙˙ü˙˙˙ ü˙˙˙ ü˙˙˙ü˙˙˙ú˙˙˙ ú˙˙˙ ţ˙˙˙ď˙˙˙ţ˙˙˙ü˙˙˙ď˙˙˙˙˙˙˙ţ˙˙˙ô˙˙˙ú˙˙˙ű˙˙˙ô˙˙˙ú˙˙˙ţ˙˙˙đ˙˙˙ü˙˙˙đ˙˙˙ţ˙˙˙ő˙˙˙ű˙˙˙ű˙˙˙ő˙˙˙ü˙˙˙ţ˙˙˙ô˙˙˙ú˙˙˙ű˙˙˙ô˙˙˙ú˙˙˙ý˙˙˙ů˙˙˙ő˙˙˙ű˙˙˙ů˙˙˙ö˙˙˙ţ˙˙˙ő˙˙˙ű˙˙˙ű˙˙˙ő˙˙˙ü˙˙˙ý˙˙˙ú˙˙˙÷˙˙˙ű˙˙˙ú˙˙˙ř˙˙˙ý˙˙˙ű˙˙˙ó˙˙˙ű˙˙˙ű˙˙˙ó˙˙˙ý˙˙˙ř˙˙˙ú˙˙˙ř˙˙˙ý˙˙˙ř˙˙˙ő˙˙˙ű˙˙˙ř˙˙˙ő˙˙˙ý˙˙˙ý˙˙˙ú˙˙˙ú˙˙˙ý˙˙˙ú˙˙˙ 

     
 
  
      ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmok
+1 -1
View File
@@ -109,7 +109,7 @@ U0 Whap()
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
WinMax;
WordStat;
AutoComplete;
Preempt(OFF);
MenuPush(
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -12,12 +12,12 @@ U0 Balloon()
CLI
OutU8(VGA_SC_INDEX,VGA_MAP_MASK);
OutU8(VGA_SC_DATA,0xF);
OutU8(VGAP_INDEX,VGAR_MAP_MASK);
OutU8(VGAP_DATA,0xF);
MemSetI64(0xA0000,0,640*480/64);
OutU8(VGA_SC_INDEX,VGA_MAP_MASK);
OutU8(VGA_SC_DATA,RED+GREEN+8);
OutU8(VGAP_INDEX,VGAR_MAP_MASK);
OutU8(VGAP_DATA,RED+GREEN+8);
for (k=100;k<150;k++) {
for (i=0;i<20;i++)
Binary file not shown.
+2 -2
View File
@@ -13,11 +13,11 @@ U0 Main()
{
"Capture screen...\n";
PressAKey;
GRACaptureScreen("HOME/ScreenShot");
GRACaptureScreen("::/Home/ScreenShot");
"View captured screen...\n";
PressAKey;
ViewScreenCapture("HOME/ScreenShot");
ViewScreenCapture("::/Home/ScreenShot");
PressAKey;
DCFill;
Binary file not shown.
+1 -1
View File
@@ -9,7 +9,7 @@ U0 Doodle()
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_BORDER;
WinMax;
WordStat;
AutoComplete;
DCFill;
DocClear;
Binary file not shown.
Binary file not shown.
+6 -6
View File
@@ -8,7 +8,7 @@ You can load it with:
If you want to change the system font permanently,
save to a file with this font editor program
and cut and paste the code into $LK,"::/Kernel/Font8x8.CPP"$.
You will need to recompile Kernel by calling $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$().
You will need to recompile Kernel by calling $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
See $LK,"::/Demo/ExtendedChars.CPP"$ and $LK,"::/Demo/ScreenCodes.CPP"$.
*/
@@ -37,7 +37,7 @@ U0 DrawIt(CTask *task,CDC *dc)
k=0;
for (i=0;i<FONT_HEIGHT;i++)
for (j=0;j<FONT_WIDTH;j++) {
if (Bt(&text.font[FONT_HEIGHT*cur_ch],k++))
if (Bt(&text.font[cur_ch],k++))
dc->color=YELLOW;
else
dc->color=BLUE;
@@ -54,7 +54,7 @@ U0 FESave(Bool pmt)
I64 i,j,k=0;
for (i=0;i<256;i++) {
for (j=0;j<FONT_HEIGHT;j++)
DocPrint(doc,"0x%02X,",text.font[k++]);
DocPrint(doc,"0x%02X,",text.font(U8 *)[k++]);
if (Bt(chars_bitmap_safe_dollar,i))
DocPrint(doc,"//%c",i);
else if (i=='$$')
@@ -77,7 +77,7 @@ U0 FontEd()
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}");
WordStat;
AutoComplete;
DocClear;
DocCursor;
Fs->win_inhibit|=WIG_DBL_CLICK;
@@ -129,9 +129,9 @@ U0 FontEd()
(a1-BLOW_UP_CHAR_X)/FONT_WIDTH;
if (0<=k<FONT_WIDTH*FONT_HEIGHT) {
if (ip.lb||msg_code==MSG_IP_L_DOWN)
Bts(&text.font[FONT_HEIGHT*cur_ch],k);
Bts(&text.font[cur_ch],k);
if (ip.rb||msg_code==MSG_IP_R_DOWN)
Btr(&text.font[FONT_HEIGHT*cur_ch],k);
Btr(&text.font[cur_ch],k);
}
break;
}
+266
View File
@@ -0,0 +1,266 @@
#define TURTLE_SIZE 4
#define TURTLE_SPEED_STEP 2
#define ANGLES 35
F64 angles[ANGLES]={
-2*ã/1,-2*ã/2,-2*ã/3,-2*ã/4,-2*ã/5,
-2*ã/6,-2*ã/8,-2*ã/9,-2*ã/10,
-2*ã/12,-2*ã/15,-2*ã/18,-2*ã/20,
-2*ã/24,-2*ã/30,-2*ã/36,-2*ã/40,
0,
2*ã/40,2*ã/36,2*ã/30,2*ã/24,
2*ã/20,2*ã/18,2*ã/15,2*ã/12,
2*ã/10,2*ã/9,2*ã/8,2*ã/6,
2*ã/5,2*ã/4,2*ã/3,2*ã/2,2*ã/1
};
class Turtle
{
F64 x,y,z,speed,é,w;
I64 dé_index;
CColorROPU16 edge,middle;
Bool ends,first;
} tt;
U0 TurtlePlot(CDC *dc,Turtle *t,CColorROPU16 edge,CColorROPU16 middle)
{
F64 w=t->w/2.0-1;
if (w<0) w=0;
dc->color=middle;
GrLine3(dc,t->x+w*Cos(t->é+ã/2),t->y+w*Sin(t->é+ã/2),t->z,
t->x+w*Cos(t->é-ã/2),t->y+w*Sin(t->é-ã/2),t->z);
w=t->w/2.0;
dc->color=edge;
GrPlot3(dc,t->x+w*Cos(t->é+ã/2),t->y+w*Sin(t->é+ã/2),t->z);
GrPlot3(dc,t->x+w*Cos(t->é-ã/2),t->y+w*Sin(t->é-ã/2),t->z);
}
U0 TurtleMicroMove(Turtle *t,F64 dt)
{
t->x+=dt*t->speed*Cos(t->é);
t->y+=dt*t->speed*Sin(t->é);
t->é=Wrap(t->é+dt*angles[t->dé_index]);
}
U0 TurtleEnd(CDC *dc,Turtle *t,CColorROPU16 edge,CColorROPU16 middle,F64 é)
{
F64 r,x,y2;
Turtle t2;
if (r=t->w) {
MemCpy(&t2,t,sizeof(Turtle)); //Save
x=0;
while (TRUE) {
t->x+=1/r*Cos(é);
t->y+=1/r*Sin(é);
x+=1/r;
y2=r*r-4*x*x;
if (y2>=0) {
t->w=Sqrt(y2);
TurtlePlot(dc,t,edge,middle);
} else
break;
}
MemCpy(t,&t2,sizeof(Turtle));
}
}
U0 TurtleMove(CDC *dc,Turtle *t,CColorROPU16 edge,CColorROPU16 middle)
{
I64 i,l=16*AbsI64(t->w+1)*AbsI64(t->speed+1);
if (t->ends && t->first)
TurtleEnd(dc,t,edge,middle,t->é+ã);
t->first=FALSE;
for (i=0;i<l;i++) {
TurtleMicroMove(t,1.0/l);
TurtlePlot(dc,t,edge,middle);
}
if (t->ends)
TurtleEnd(dc,t,edge,middle,t->é);
}
U0 TurtleInit(Turtle *t)
{
MemSet(t,0,sizeof(Turtle));
t->x=Fs->pix_width>>1;
t->y=Fs->pix_height>>1;
t->z=5;
t->edge=BLACK;
t->middle=YELLOW;
t->dé_index=ANGLES/2;
t->first=TRUE;
t->ends=TRUE;
}
U0 DrawIt(CTask *,CDC *dc)
{
Turtle t2;
MemCpy(&t2,&tt,sizeof(Turtle));
GrPrint(dc,0,0,"Layer:%f Speed:%f é:%5.1f dé:%5.1f Width:%f",
tt.z,tt.speed,tt.é*180/ã,angles[tt.dé_index]*180/ã,tt.w);
TurtleMove(dc,&t2,RED,LTRED);
dc->color=LTRED;
GrLine(dc,t2.x+TURTLE_SIZE*Cos(t2.é+ã/2),t2.y+TURTLE_SIZE*Sin(t2.é+ã/2),
t2.x+TURTLE_SIZE*Cos(t2.é-ã/2),t2.y+TURTLE_SIZE*Sin(t2.é-ã/2));
GrLine(dc,t2.x+TURTLE_SIZE*Cos(t2.é+ã/2),t2.y+TURTLE_SIZE*Sin(t2.é+ã/2),
t2.x+TURTLE_SIZE*Cos(t2.é), t2.y+TURTLE_SIZE*Sin(t2.é));
GrLine(dc,t2.x+TURTLE_SIZE*Cos(t2.é-ã/2),t2.y+TURTLE_SIZE*Sin(t2.é-ã/2),
t2.x+TURTLE_SIZE*Cos(t2.é), t2.y+TURTLE_SIZE*Sin(t2.é));
}
U0 SetMenu()
{
I64 i;
U8 buf[64];
CMenuEntry *tempse;
for (i=0;i<=9;i++) {
StrPrint(buf,"Settings/Layer%d",i);
if (tempse=MenuEntryFind(Fs->cur_menu,buf)) {
if (i==tt.z)
tempse->checked=TRUE;
else
tempse->checked=FALSE;
}
}
if (tempse=MenuEntryFind(Fs->cur_menu,"Settings/Ends")) {
if (tt.ends)
tempse->checked=TRUE;
else
tempse->checked=FALSE;
}
}
U0 Lattice()
{
Bool aim=FALSE;
I64 a1,a2;
CDC *dc=DCAlias;
DCAllocDepthBuf(dc);
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}"
"Play {"
" Restart(,'\n');"
" Step(,CH_SPACE);"
" Accelerator(,,SC_CURSOR_UP);"
" Break(,,SC_CURSOR_DOWN);"
" Left(,,SC_CURSOR_LEFT);"
" Right(,,SC_CURSOR_RIGHT);"
"}"
"Settings {"
" Color(,'c');"
" Wider(,'+');"
" Narrower(,'-');"
" Ends(,'e');"
" Layer0(,'0');"
" Layer1(,'1');"
" Layer2(,'2');"
" Layer3(,'3');"
" Layer4(,'4');"
" Layer5(,'5');"
" Layer6(,'6');"
" Layer7(,'7');"
" Layer8(,'8');"
" Layer9(,'9');"
"}"
);
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Preempt(OFF);
WinMax;
AutoComplete;
WinBorder;
DocClear;
DocCursor;
TurtleInit(&tt);
SetMenu;
Fs->win_inhibit=WIG_TASK_DFT-WIF_FOCUS_TASK_MENU-WIF_SELF_FOCUS-WIF_SELF_GRAB_SCROLL;
Fs->draw_it=&DrawIt;
try {
while (TRUE) {
switch (GetMsg(&a1,&a2,1<<MSG_KEY_DOWN|1<<MSG_IP_L_DOWN|
1<<MSG_IP_R_DOWN|1<<MSG_IP_R_UP|1<<MSG_IP_MOVE)) {
case MSG_IP_L_DOWN:
tt.first=TRUE;
tt.x=a1;
tt.y=a2;
break;
case MSG_IP_R_DOWN:
aim=TRUE;
tt.é=Arg(a1-tt.x,a2-tt.y);
break;
case MSG_IP_MOVE:
if (aim)
tt.é=Arg(a1-tt.x,a2-tt.y);
break;
case MSG_IP_R_UP:
tt.é=Arg(a1-tt.x,a2-tt.y);
aim=FALSE;
break;
case MSG_KEY_DOWN:
switch (a1) {
case 0:
switch (a2.u8[0]) {
case SC_CURSOR_LEFT:
if (tt.dé_index)
tt.dé_index--;
break;
case SC_CURSOR_RIGHT:
if (tt.dé_index<ANGLES-1)
tt.dé_index++;
break;
case SC_CURSOR_UP:
tt.speed+=TURTLE_SPEED_STEP;
break;
case SC_CURSOR_DOWN:
if (tt.speed>=TURTLE_SPEED_STEP)
tt.speed-=TURTLE_SPEED_STEP;
break;
}
break;
case '0'...'9':
tt.z=a1-'0';
SetMenu;
break;
case 'c':
tt.middle=PopUpColor("Middle Color\n\n");
tt.edge =PopUpColor("Edge Color\n\n");
break;
case 'e':
tt.ends=!tt.ends;
break;
case '+':
tt.w++;
break;
case '-':
if (tt.w)
tt.w--;
break;
case '\n':
DCFill(dc);
TurtleInit(&tt);
SetMenu;
break;
case CH_ESC:
case CH_SHIFT_ESC:
goto lt_done;
case CH_SPACE:
TurtleMove(dc,&tt,tt.edge,tt.middle);
break;
}
}
}
lt_done:
GetMsg(,,1<<MSG_KEY_UP);
} catch
PutExcept;
SettingsPop;
DCFill(dc);
DCDel(dc);
MenuPop;
}
Lattice;
+5 -6
View File
@@ -1,3 +1,5 @@
//Conway's Game of Life
CDC *dc[2]; //dbl buf
I64 cur_dc,;
Bool restart;
@@ -59,13 +61,11 @@ public U0 Life()
DocClear;
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
WordStat;
AutoComplete;
Fs->draw_it=&DrawIt;
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_BORDER;
do {
msg_code=GetMsg(&a1,&a2,
1<<MSG_KEY_DOWN+1<<MSG_IP_L_DOWN);
msg_code=GetMsg(&a1,&a2,1<<MSG_KEY_DOWN+1<<MSG_IP_L_DOWN);
switch (msg_code) {
case MSG_IP_L_DOWN:
x1=a1; y1=a2;
@@ -77,8 +77,7 @@ public U0 Life()
dc[cur_dc]->pen_width=0.04*ip.speed;
GrLine3(dc[cur_dc],x1,y1,0,x2,y2,0);
restart=TRUE;
msg_code=GetMsg(&a1,&a2,
1<<MSG_IP_L_UP+1<<MSG_IP_MOVE);
msg_code=GetMsg(&a1,&a2,1<<MSG_IP_L_UP+1<<MSG_IP_MOVE);
x1=x2; y1=y2;
x2=a1; y2=a2;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8 -8
View File
@@ -8,19 +8,19 @@ F64 scale;
Complex *PoleZeroFind(I64 x,I64 y)
{
I64 i;
F64 d,best_d=MAX_F64;
F64 dd,best_dd=MAX_F64;
Complex *result=NULL;
for (i=0;i<NUM_POLES;i++) {
d=Sqr(poles[i].x-x)+Sqr(poles[i].y-y);
if (d<best_d) {
best_d=d;
dd=Sqr(poles[i].x-x)+Sqr(poles[i].y-y);
if (dd<best_dd) {
best_dd=dd;
result=&poles[i];
}
}
for (i=0;i<NUM_ZEROS;i++) {
d=Sqr(zeros[i].x-x)+Sqr(zeros[i].y-y);
if (d<best_d) {
best_d=d;
dd=Sqr(zeros[i].x-x)+Sqr(zeros[i].y-y);
if (dd<best_dd) {
best_dd=dd;
result=&zeros[i];
}
}
@@ -109,7 +109,7 @@ U0 PoleZeros()
SetVGAPaletteColor(15,0xFF0000); //White is red
WinMax;
WordStat;
AutoComplete;
WinBorder;
DCFill;
+1 -1
View File
@@ -59,7 +59,7 @@ U0 PredatorPrey()
WinMax;
WinBorder;
WinMgrSync;
WordStat;
AutoComplete;
dc->color=BLACK;
GrLine(dc,OX,0,OX,GR_HEIGHT-FONT_HEIGHT-1);
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -89,7 +89,7 @@ U0 DrawIt(CTask *task,CDC *dc)
è = i*ã/2/RINGS;
è2=(i+1)*ã/2/RINGS+SLOP;
for (j=0;j<FACES;j++) {
é = j*2*ã/FACES;
é =j*2*ã/FACES;
é2=(j+1)*2*ã/FACES+SLOP;
//Upper half
@@ -162,7 +162,7 @@ U0 Main()
DocClear;
WinMax;
WinBorder;
WordStat;
AutoComplete;
Fs->draw_it=&DrawIt;
try {
"\n\nMove mouse to change light source.\n\n";
@@ -16,7 +16,7 @@ class CSliderState
I64 right_pos;
} sld;
U0 DrawSliderCtrl(CDC *dc,CCtrl *c)
U0 DrawCtrlSlider(CDC *dc,CCtrl *c)
{
CSliderState *s=c->state;
@@ -44,7 +44,7 @@ U0 DrawSliderCtrl(CDC *dc,CCtrl *c)
GrRect(dc,c->left+2*SLIDER_SPACING+1-2,c->top+SLIDER_SPACING+SLIDER_RANGE-1-s->right_pos-1,5,3);
}
U0 UpdateDerivedSliderCtrl(CCtrl *c)
U0 UpdateDerivedCtrlSlider(CCtrl *c)
{
CSliderState *s=c->state;
c->left=c->win_task->pix_width/2-(SLIDER_SPACING*3+2)/2;
@@ -75,9 +75,9 @@ CCtrl *SliderNew()
c->type=CTRLT_GENERIC;
c->state=&sld;
MemSet(&sld,0,sizeof(CSliderState));
c->draw_it=&DrawSliderCtrl;
c->draw_it=&DrawCtrlSlider;
c->left_click=&LeftClickSlider;
c->update_derived_vals=&UpdateDerivedSliderCtrl;
c->update_derived_vals=&UpdateDerivedCtrlSlider;
old_preempt=Preempt(OFF);
QueIns(c,Fs->last_ctrl);
TaskDerivedValsUpdate;
+1 -1
View File
@@ -11,7 +11,7 @@ public U0 SpeedLineDemo()
WinMax;
WinBorder;
WordStat;
AutoComplete;
DCFill;
DocClear;
do {
Binary file not shown.
Binary file not shown.
Binary file not shown.
+38
View File
@@ -0,0 +1,38 @@
//Normally, you make sprites with <CTRL-r>.
//This shows how to build a sprite by hand.
//See $MA-X+PU,"::/Apps/GrModels",LM="Cd(\"::/Apps/GrModels\");Dir;View;\n"$.
class MySprite
{ // See $LK,"Sprite Elem Types",A="MN:SPT_LINE"$
CSpriteColor color;
CSpritePtPt line1;
CSpritePtPt line2;
CSpritePtPt line3;
CSpritePt fill;
CSpriteBase end;
};
U0 SpriteRawDemo()
{
MySprite s;
MemSet(&s,0,sizeof(s));
s.color.type=SPT_COLOR;
s.color.color=GREEN;
s.line1.type=SPT_LINE;
s.line1.x2=100; s.line1.y2=50;
s.line2.type=SPT_LINE;
s.line2.x2=50; s.line2.y2=100;
s.line3.type=SPT_LINE;
s.line3.x1=100; s.line3.y1=50;
s.line3.x2=50; s.line3.y2=100;
s.fill.type=SPT_FLOOD_FILL;
s.fill.x1=20; s.fill.y1=20;
s.end.type=SPT_END;
Sprite(&s);
"%h13c",'\n';
}
SpriteRawDemo;
+3 -3
View File
@@ -10,8 +10,8 @@ U0 SunMoon()
WinMax; //Maximize window
DocClear; //Clear command-line text
WinBorder; //No Border
WordStat; //WordStat Off
Fs->text_attr=BLACK<<+WHITE; //Current $LK,"CTask",A="MN:CTask"$ is Fs segment register.
AutoComplete; //AutoComplete Off
Fs->text_attr=BLACK<<4+WHITE; //Current $LK,"CTask",A="MN:CTask"$ is Fs segment register.
for (i=0;i<0x8000;i+=0x200) {
//Sun
@@ -33,7 +33,7 @@ U0 SunMoon()
gr.dc->dither_probability_u16=2*i; //U16 can be [0,65535]
GrFloodFill(gr.dc,x-0.75*radius,y);
WinMgrSync; //Typically 60 fps or 16.6mS
WinMgrSync; //Typically 30 fps or 33S
DCFill;
}
Binary file not shown.
+5 -5
View File
@@ -5,7 +5,7 @@ This is an advanced demo that shows
that you can place ctrls on the
wall paper.
See $LK,"::/Demo/Graphics/SliderCtrl.CPP"$
See $LK,"::/Demo/Graphics/Slider.CPP"$
and $LK,"::/Demo/Graphics/WallPaperFish.CPP"$
before messing with this program.
@@ -22,7 +22,7 @@ class CSliderState
I64 right_pos;
};
U0 DrawSliderCtrl(CDC *dc,CCtrl *c)
U0 DrawCtrlSlider(CDC *dc,CCtrl *c)
{
CSliderState *s=c->state;
@@ -50,7 +50,7 @@ U0 DrawSliderCtrl(CDC *dc,CCtrl *c)
GrRect(dc,c->left+2*SLIDER_SPACING+1-2,c->top+SLIDER_SPACING+SLIDER_RANGE-1-s->right_pos-1,5,3);
}
U0 UpdateDerivedSliderCtrl(CCtrl *c)
U0 UpdateDerivedCtrlSlider(CCtrl *c)
{
CSliderState *s=c->state;
c->left=c->win_task->pix_width/2-(SLIDER_SPACING*3+2)/2;
@@ -86,9 +86,9 @@ CCtrl *SliderNew()
c->flags=CTRLF_SHOW|CTRLF_CAPTURE_LEFT_IP;
c->type=CTRLT_GENERIC;
c->state=ACAlloc(sizeof(CSliderState));
c->draw_it=&DrawSliderCtrl;
c->draw_it=&DrawCtrlSlider;
c->left_click=&LeftClickSlider;
c->update_derived_vals=&UpdateDerivedSliderCtrl;
c->update_derived_vals=&UpdateDerivedCtrlSlider;
old_preempt=Preempt(OFF);
QueIns(c,sys_winmgr_task->last_ctrl);
TaskDerivedValsUpdate;
Binary file not shown.
+1 -1
View File
@@ -70,7 +70,7 @@ ANSWERS:
5) The R13 instruction takes one more byte because it is like $LK,"REG_RBP",A="MN:REG_RBP"$ in the ModR.
6) The RAX instruction has a REX byte prefix to specify 64-bit size. So does the R8 instruction, but in the REX is also a flag to specify upper-8 reg. For EAX, there is no need of REX.
6) The R8 instruction needs a REX byte prefix to specify upper-8 reg.
7) You can access the lowest byte of any reg. You can access AH but not the second-to-lowest byte of ESI.
+4 -4
View File
@@ -6,8 +6,8 @@ F64 VGAPattern(I64 p)
F64 start=tS;
I64 plane;
for (plane=1;plane<0x10;plane<<=1) {
OutU8(VGA_SC_INDEX,VGA_MAP_MASK);
OutU8(VGA_SC_DATA,plane);
OutU8(VGAP_INDEX,VGAR_MAP_MASK);
OutU8(VGAP_DATA,plane);
MemSetI64(0xA0000,p,640*480/64);
}
return tS-start;
@@ -23,10 +23,10 @@ U0 GrDemo()
for (i=0;i<16;i++) {
t=VGAPattern(0x5555555555555555);
"$$GREEN$$Rate:$$RED$$%5.1f FPS$$FG$$"
" $$GREEN$$Load@60Hz:$$RED$$%5.1f%%$$FG$$\n",1/t,100*t*60.0;
" $$GREEN$$Load@30Hz:$$RED$$%5.1f%%$$FG$$\n",1/t,100*t*30.0;
t=VGAPattern(0x3333333333333333);
"$$GREEN$$Rate:$$RED$$%5.1f FPS$$FG$$"
" $$GREEN$$Load@60Hz:$$RED$$%5.1f%%$$FG$$\n",1/t,100*t*60.0;
" $$GREEN$$Load@30Hz:$$RED$$%5.1f%%$$FG$$\n",1/t,100*t*30.0;
}
Preempt(old_preempt);
//<CTRL-ALT-f> will flush screen VGA cache.
+6 -6
View File
@@ -1,12 +1,12 @@
/*$WW,1$
$TR,"Main Compiler"$
$TR-C,"Main Compiler"$
$ID,2$The mini compiler is like the main compiler, except the main compiler's lexical analyser removes comments and does preprocessing. $LK,"Lex",A="MN:Lex"$(),$LK,"Echo",A="MN:Echo"$(ON).
The main compiler generates $LK,"Intermediate Code",A="FF:::/Compiler/CmpDefs.HPP,IC_END"$ at the parser stage. See $LK,"PrsExpression",A="MN:PrsExpression"$(), $LK,"PrsStatement",A="MN:PrsStatement"$().
The main compiler generates $LK,"Intermediate Code",A="FF:::/Compiler/CompilerA.HPP,IC_END"$ at the parser stage. See $LK,"PrsExpression",A="MN:PrsExpression"$(), $LK,"PrsStatement",A="MN:PrsStatement"$().
The main compiler optimizes See $LK,"Intermediate Code Attributes",A="FF:D:/Compiler/CmpInit.CPP,ST_INTERMEDIATE_CODE"$, $LK,"Combining Consts",A="FF:::/Compiler/OptPass012.CPP,case IC_MUL"$, $LK,"Choosing Reg Vars",A="FF:::/Compiler/OptPass3.CPP,cmp.num_reg_vars"$. Set $LK,"OTrace",A="MN:OTrace"$(ON) to see the optimization stages.
The main compiler optimizes See $LK,"Intermediate Code Attributes",A="MN:intermediate_code_table"$, $LK,"Combining Consts",A="FF:::/Compiler/OptPass012.CPP,case IC_MUL"$, $LK,"Choosing Reg Vars",A="FF:::/Compiler/OptPass3.CPP,cmp.num_reg_vars"$. Set $LK,"OTrace",A="MN:OTrace"$(ON) to see the optimization stages.
The main compiler makes machine code in the back end. See $LK,"IC Struct",A="MN:CIntermediateCode"$, $LK,"LCCCompile",A="MN:LCCCompile"$ and $LK,"OptPass789",A="FF:::/Compiler/OptPass789.CPP,IC_MUL"$(), $LK,"BackEnd",A="FF:::/Compiler/Back1a.CPP,ICMul"$. Set $LK,"CTrace",A="MN:CTrace"$(ON) to see the output of the backend.
The main compiler makes machine code in the back end. See $LK,"IC Struct",A="MN:CIntermediateCode"$, $LK,"LCCCompile",A="MN:LCCCompile"$ and $LK,"OptPass789A",A="FF:::/Compiler/OptPass789A.CPP,IC_MUL"$(), $LK,"BackEnd",A="FF:::/Compiler/BackA.CPP,ICMul"$. Set $LK,"CTrace",A="MN:CTrace"$(ON) to see the output of the backend.
$ID,-2$
$TR,"Mini Compiler"$
$ID,2$For this mini compiler, some things you should know about 64-bit asm:
@@ -216,8 +216,8 @@ U0 Main()
throw;
"$$RED$$This code is not efficient, but the compiler is simple.$$FG$$\n";
Un(code,dst-code); //Unassemble the code we created.
//$LK,"Call",A="MN:Call"$() is a function. See $LK,"_CALL",A="FF:::/Kernel/Utils1a.CPP,_CALL"$::
//See also $LK,"CallInd",A="MN:CallInd"$(). See $LK,"_CALLIND",A="FF:::/Kernel/Utils1a.CPP,_CALLIND"$::
//$LK,"Call",A="MN:Call"$() is a function. See $LK,"_CALL",A="FF:::/Kernel/KUtils.CPP,_CALL"$::
//See also $LK,"CallInd",A="MN:CallInd"$(). See $LK,"_CALLIND",A="FF:::/Kernel/KUtils.CPP,_CALLIND"$::
"$$LTBLUE$$Answer:%d$$FG$$\n",Call(code);
} catch {
"$$RED$$Error$$FG$$\n";
+2 -2
View File
@@ -19,8 +19,8 @@ U0 MGUpdate()
{//Copy image to VGA memory
//For better performance we could only write what's changed.
//0xA0000 is slower than normal RAM.
OutU8(VGA_SC_INDEX,VGA_MAP_MASK);
OutU8(VGA_SC_DATA,0xF);//All color planes at once -- Black and White
OutU8(VGAP_INDEX,VGAR_MAP_MASK);
OutU8(VGAP_DATA,0xF);//All color planes at once -- Black and White
MemCpy(0xA0000,image,sizeof(image));
}
+7 -7
View File
@@ -5,12 +5,12 @@ TempleOS keeps a cached copy of VGA memory in
$LK,"gr.screen_image",A="MN:CGrGlbls"$. See $LK,"GrUpdateVGAGraphics",A="MN:GrUpdateVGAGraphics"$.
TempleOS used 4096 size pages for memory below addr 2 Meg
and 2 Meg pages above two Meg. See $LK,"MemPageSize",A="MN:MemPageSize"$() and $LK,"INIT_MEMORY",A="FF:::/Kernel/Mem1a.CPP,SYS_INIT_MEM"$.
and 2 Meg pages above two Meg. See $LK,"MemPageSize",A="MN:MemPageSize"$() and $LK,"INIT_MEMORY",A="FF:::/Kernel/MemA.CPP,SYS_INIT_MEM"$.
*/
U0 PageTableDemo1()
{
I64 *pte=MemPageTable(VGA_GRAPHIC_MEM_BASE),p0,p1;
I64 *pte=MemPageTable(VGAM_GRAPHICS),p0,p1;
"Page table entries for VGA screen memory\n";
DocD(pte);
PressAKey;
@@ -19,8 +19,8 @@ U0 PageTableDemo1()
p1=pte[1];
pte[0]=p1;
pte[1]=p0;
InvlPg(VGA_GRAPHIC_MEM_BASE); //Invalidate translation look aside buffer (TLB).
InvlPg(VGA_GRAPHIC_MEM_BASE+0x1000);
InvlPg(VGAM_GRAPHICS); //Invalidate translation look aside buffer (TLB).
InvlPg(VGAM_GRAPHICS+0x1000);
//Use this if you wish to change
//the page table reg.
@@ -34,8 +34,8 @@ U0 PageTableDemo1()
pte[0]=p0;
pte[1]=p1;
InvlPg(VGA_GRAPHIC_MEM_BASE);
InvlPg(VGA_GRAPHIC_MEM_BASE+0x1000);
InvlPg(VGAM_GRAPHICS);
InvlPg(VGAM_GRAPHICS+0x1000);
//<CTRL-ALT-f> will flush screen VGA cache.
VGAFlush;
@@ -43,6 +43,6 @@ U0 PageTableDemo1()
PageTableDemo1;
//See $LK,"MemBlks2MegAlloc",A="MN:MemBlks2MegAlloc"$(), $LK,"MemBlks2MegFree",A="MN:MemBlks2MegFree"$() for page aligned allocations.
//See $LK,"Mem2MegAlloc",A="MN:Mem2MegAlloc"$(), $LK,"Mem2MegFree",A="MN:Mem2MegFree"$() for page aligned allocations.
//See $LK,"CBlkPool",A="MN:CBlkPool"$, $LK,"CHeapCtrl",A="MN:CHeapCtrl"$, $LK,"sys_code_bp",A="MN:sys_code_bp"$ and $LK,"sys_data_bp",A="MN:sys_data_bp"$.
//See $LK,"Memory Overview",A="FI:::/Doc/MemOverview.TXT"$ and $LK,"Memory Routines",A="HI:Memory"$.
Loaded 100 of 531 files, more files were not shown because too many files have changed in this diff. Show more