<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>Game1.HC</title>
		<link rel="stylesheet" href="/style/templeos.css">
		<script src="/script/templeos.js" defer></script>
	</head>
	<body class="BG-15 FG-0 ">
		U0 DrawIt(CTask *task,CDC *dc)<br>
{<br>
}<br>
<br>
U0 AnimateTask(I64)<br>
{<br>
  while (TRUE) {<br>
    Sleep(10);<br>
  }<br>
}<br>
<br>
U0 Init()<br>
{<br>
}<br>
<br>
U0 CleanUp()<br>
{<br>
}<br>
<br>
U0 SongTask(I64)<br>
{<br>
  Fs-&gt;task_end_cb=&amp;SndTaskEndCB;<br>
  MusicSettingsRst;<br>
  while (TRUE) {<br>
    Play("4AB5C");<br>
  }<br>
}<br>
<br>
U0 MyGame()<br>
{<br>
  I64 sc;<br>
  SettingsPush; //See <a href="#" onclick="alert('This type of link (MN) is not implemented yet')">SettingsPush</a><br>
  Fs-&gt;text_attr=YELLOW&lt;&lt;4+BLUE;<br>
  Fs-&gt;song_task=Spawn(&amp;SongTask,NULL,"Song",,Fs);<br>
  AutoComplete;<br>
  WinBorder;<br>
  WinMax;<br>
  DocCursor;<br>
  DocClear;<br>
<br>
  MenuPush(<br>
	"File {"<br>
	"  Abort(,CH_SHIFT_ESC);"<br>
	"  Exit(,CH_ESC);"<br>
	"}"<br>
	"Play {"<br>
	"  Restart(,'\n');"<br>
	"  Up(,,SC_CURSOR_UP);"<br>
	"  Down(,,SC_CURSOR_DOWN);"<br>
	"  Left(,,SC_CURSOR_LEFT);"<br>
	"  Right(,,SC_CURSOR_RIGHT);"<br>
	"}"<br>
	);<br>
<br>
  Init;<br>
  Fs-&gt;animate_task=Spawn(&amp;AnimateTask,NULL,"Animate",,Fs);<br>
  Fs-&gt;draw_it=&amp;DrawIt;<br>
<br>
  try {<br>
    while (TRUE)<br>
      switch (GetKey(&amp;sc)) {<br>
	case 0:<br>
	  switch (sc.u8[0]) {<br>
	    case SC_CURSOR_LEFT:<br>
	      break;<br>
	    case SC_CURSOR_RIGHT:<br>
	      break;<br>
	    case SC_CURSOR_UP:<br>
	      break;<br>
	    case SC_CURSOR_DOWN:<br>
	      break;<br>
	  }<br>
	  break;<br>
	case '\n':<br>
	  CleanUp;<br>
	  Init;<br>
	  break;<br>
	case CH_SHIFT_ESC:<br>
	case CH_ESC:<br>
	  goto mg_done;<br>
      }<br>
mg_done: //Don't goto out of try<br>
  } catch<br>
    PutExcept;<br>
  SettingsPop;<br>
  CleanUp;<br>
  MenuPop;<br>
}<br>
<br>
MyGame;<br>

	</body>
</html>