Example #1
0
//-------- Begin of static function disp_version --------//
//
void Game::disp_version()
{
	//----------- display version string --------//

	String str;

	// ####### begin Gilbert 5/6 ########//
//	str  = "Version ";
//	str += GAME_VERSION_STR;
//	#ifdef DEMO
//		str = "Demo Version";
//	#endif
//	#ifdef BETA
//		str = "This is a Beta version. Unauthorized distribution of this Beta is strictly prohibited.";
//	#endif

#if(defined(BETA))
//	str = "This is a Beta version. Unauthorized distribution of this Beta is strictly prohibited.";
	str = text_game_menu.str_beta_version();
#elif(defined(DEMO))
//	str = "Demo Version";
//	str = text_game_menu.str_demo_version();
	str = "";
#else
//	str  = "Version ";
//	str += GAME_VERSION_STR;
	str = text_game_menu.str_version( GAME_VERSION_STR );
#endif
	// ####### end Gilbert 5/6 ########//

	if( str.len() > 40 )
		font_san.center_put( 0, VGA_HEIGHT-20, VGA_WIDTH-1, VGA_HEIGHT-1, str );
	else
		font_zoom.put( VGA_WIDTH-100, 73, str );
}
Example #2
0
//-------- Begin of static function disp_version --------//
//
void Game::disp_version()
{
	//----------- display version string --------//

	String str;

	str  = _("Version");
	str += " ";
	str += GAME_VERSION_STR;

	#ifdef DEV_VERSION
		str += "-dev";
	#endif

	#ifdef DEBUG
		str += " (DEBUG)";
	#endif

	#ifdef DEMO
		str = "Demo Version";
	#endif

	#ifdef BETA
		str = "This is a Beta version. Unauthorized distribution of this Beta is illegal.";
	#endif

	if( str.len() > 40 )
		font_news.center_put( 0, VGA_HEIGHT-20, VGA_WIDTH-1, VGA_HEIGHT-1, str );
	else
		font_news.right_put( VGA_WIDTH-10, VGA_HEIGHT-20, str );
}
Example #3
0
//-------- Begin of static function disp_version --------//
//
void Game::disp_version()
{
	//----------- display version string --------//

	String str;

	str = text_game_menu.str_version( GAME_VERSION_STR );

	if( str.len() > 40 )
		font_san.center_put( 0, VGA_HEIGHT-20, VGA_WIDTH-1, VGA_HEIGHT-1, str );
	else
		font_zoom.put( VGA_WIDTH-100, 73, str );
}
Example #4
0
int main() {
    TextFile file;
    String s;
    if (file.open("birthday.in")) {
        while (true) {
            String f = file.read_line();
            if (f.is_empty()) {
                break;
            }
            s += f;
        }
    }
    
    for (int i = 0; i < s.len(); i += 1) {
        
    }
    

    return 0;
}
Example #5
0
void TimeFmt::printCustom(int sec, const char *buf, int bufsize, const char *str_sep, const char *str_seconds, const char *str_minutes, const char *str_hours, const char *str_days) {
  if (buf == NULL || bufsize == 0) return;
  char *p = (char *)buf;
  *p = 0;
  int days, hours, minutes;
  String s;

  if (str_days) {
    days = sec / (3600*24);
    sec -= days * (3600*24);
    if (days != 0) {
      s += StringPrintf("%d%s", days, str_days);
    }
  }
  if (str_hours) {
    hours = sec / 3600;
    sec -= hours * 3600;
    if (hours != 0) {
      if (!s.isempty()) s += str_sep;
      s += StringPrintf("%d%s", hours, str_hours);
    }
  }
  if (str_minutes) {
    minutes = sec / 60;
    sec -= minutes * 60;
    if (minutes != 0) {
      if (!s.isempty()) s += str_sep;
      s += StringPrintf("%d%s", minutes, str_minutes);
    }
  }
  if (str_seconds) {
    if (sec != 0) {
      if (!s.isempty()) s += str_sep;
      s += StringPrintf("%d%s", sec, str_seconds);
    }
  }
  STRNCPY(p, s.getValue(), bufsize);
  int l = s.len();
  if (l < bufsize) p[l] = 0;
}