コード例 #1
0
ファイル: BlockBoy.c プロジェクト: weber21w/uzebox-weber
void WinGame(){

	while(GetMasterVolume()){
		if(GetMasterVolume() > 4)
			SetMasterVolume(GetMasterVolume()-4);
		else{
			StopSong();
			break;
		}
		WaitVsync(1);
	}
	FadeOut(9,true);
	SetTileTable(font_tiles);
	ClearVram();
	WaitVsync(45);
	SetMasterVolume(BB_MASTER_VOLUME);
	//TriggerNote(4,24,8,255);//StartSong(main_song);
	FadeIn(2,false);
	TextWriter(1,0,epilogue_string);
	while(1){
		WaitVsync(1);
		if(padState & BTN_START && !(oldPadState & BTN_START))
			break;
	}
	FadeOut(7,true);
}
コード例 #2
0
ファイル: LogFile.cpp プロジェクト: MaxPower-No1/XCSoar
static TextWriter
OpenLog()
{
  static bool initialised = false;
  static AllocatedPath path = nullptr;

  const bool append = initialised;
  if (!initialised) {
    initialised = true;

    /* delete the obsolete log file */
    File::Delete(LocalPath(_T("xcsoar-startup.log")));

    path = LocalPath(_T("xcsoar.log"));

    File::Replace(path, LocalPath(_T("xcsoar-old.log")));

#ifdef ANDROID
    /* redirect stdout/stderr to xcsoar-startup.log on Android so we
       get debug logs from libraries and output from child processes
       there */
    int fd = open(path.c_str(), O_APPEND|O_CREAT|O_WRONLY, 0666);
    if (fd >= 0) {
      dup2(fd, 1);
      dup2(fd, 2);
      close(fd);
    }
#endif
  }

  return TextWriter(path, append);
}
コード例 #3
0
static TextWriter
OpenLog()
{
  static bool initialised = false;
  static TCHAR path[MAX_PATH];

  const bool append = initialised;
  if (!initialised) {
    initialised = true;
    LocalPath(path, _T("xcsoar-startup.log"));
  }

  return TextWriter(path, append);
}
コード例 #4
0
	/**
	 * @brief Returns a writer to a subset of this writer's data.
	 */ 
	TextWriter writerOnRange( kiwi::uint32_t firstLine, kiwi::uint32_t lastLine ){
		return TextWriter(*_container
				, _firstLine + firstLine
				, lastLine - firstLine + 1 );
	}