//Puts the cursor at the bottom. Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN|SCF_CTRL); "\n"; TourPut( "Now, we're going to demonstrate how to work " "with programs. We'll change to the " "$$GREEN$$/Demo/Games$$FG$$ directory.\n\n" "Note that directories are specified with " "a forward slash, not a backslash. " "Drives can be specified in a $$GREEN$$Cd()$$FG$$ command " "and the boot drive is specified with \"$$GREEN$$::$$FG$$\".\n\n" "$$GREEN$$$$FG$$ to complete the command.\n"); AFPrint(25,"Cd(\"::/Demo/Games\");Dir;"); AFGetStr("\n"); TourPut( "Now, we're going to edit a file. Normally, " "you'll probably left-click on a directory " "listing to edit a file, but we're going to " "type it on the command line.\n\n" "$$GREEN$$$$FG$$ to complete the command.\n"); AFPrint(25,"Ed(\"CastleFrankenstein.CPP.Z\");"); AFGetStr("\n"); Msg(MSG_KEY_DOWN_UP,0,SC_CURSOR_UP|SCF_CTRL); Sleep(1000); Msg(MSG_KEY_DOWN_UP,0,SC_CURSOR_DOWN|SCF_CTRL); TourPut( "This is a first-person-shooter.\n\n" "There is no \"$$GREEN$$main()$$FG$$\" function in TempleOS " "programs. Any program stmts outside " "functions get executed when you $$GREEN$$#include$$FG$$ " "them at the command line.\n\n" "The \"$$GREEN$$CastleFrankenstein;$$FG$$\" stmt at the " "bottom will run the program when we " "$$GREEN$$#include$$FG$$ it.\n",TRUE); TourPut("Press $$GREEN$$$$FG$$ to abort the editor.\n"); AFGetChar(CH_ESC,CH_SHIFT_ESC); TourPut( "Now, run the CastleFrankenstein.CPP.Z program. Press $$GREEN$$$$FG$$.\n"); AFPrint(25,"#include \"CastleFrankenstein\";"); AFGetStr("\n"); TourPut( "Move around with cursor keys and press $$GREEN$$$$FG$$ when you " "are done.\n"); AFUntilChar(CH_ESC,CH_SHIFT_ESC); TourPut( "The program is still in memory and we can start it again by typing " "\"$$GREEN$$CastleFrankenstein;$$FG$$\".\n\n" "Press $$GREEN$$$$FG$$ at the command line to run it again.\n"); AFPrint(25,"CastleFrankenstein;"); AFGetStr("\n"); TourPut( "Move around with cursor keys and press $$GREEN$$$$FG$$ when you " "are done.\n"); AFUntilChar(CH_ESC,CH_SHIFT_ESC); TourPut( "$$GREEN$$$$FG$$\tExtended ASCII.\n" "$$GREEN$$$$FG$$\tBreak(interrupt) program.\n" "$$GREEN$$$$FG$$\tSpawn new user terminal window.\n" "$$GREEN$$$$FG$$\tMutes sound.\n" "$$GREEN$$$$FG$$\tSwitch tasks.\n" "$$GREEN$$$$FG$$\tKill task (window).\n",TRUE); AFPrint(50,"Ed(\"CastleFrankenstein.CPP.Z\");\n"); TourPut("Press $$GREEN$$$$FG$$ in the editor to run the file being edited.\n"); AFGetKey(SC_F5); Sleep(1000); CTask *task=sys_focus_task; TourPut( "Press $$GREEN$$$$FG$$ to abort the application. " "Then, press $$GREEN$$$$FG$$ to kill the task.\n"); WinToTop(task); while (TaskValidate(task)) Sleep(10); TourPut("Press $$GREEN$$$$FG$$ to abort the editor.\n"); AFUntilChar(CH_ESC,CH_SHIFT_ESC); TourPut( "Explore the $$RED$$$TX+L+PU+UL,"DemoIndex",A="FI:::/Doc/DemoIndex.TXT"$$$FG$$. " "You'll find it on your menu. It's arranged by difficulty. " "Hit $$GREEN$$$$FG$$ on a demo index listing " "and $$GREEN$$$$FG$$ to run from the editor.\n",TRUE);