예제 #1
0
파일: ogamhall.cpp 프로젝트: 112212/7k2
//------ Begin of function GameFileArray::disp_hall_of_fame -----//
//
// Display the Hall of Fame
// <int> type = 0 when human
//				  = 1 when frythan	
//
void GameFileArray::disp_hall_of_fame(int type)
{
	// ######## begin Gilbert 10/6 #######//
	// read hall of fame first
	if( !has_read_hall_of_fame )
	{
		read_hall_of_fame();
		has_read_hall_of_fame = 1;
	}
	// ######## end Gilbert 10/6 #######//

	int y = 116, offset = 76;
	if (type)
	{
		vga_util.disp_image_file("halfame2");
		y += 76;
		offset -= 20;
	}
	else
		vga_util.disp_image_file("halfame1");

	//---------- display hall of fame records ------------//

	int i;
	int x=130;

	for( i=0 ; i<HALL_FAME_NUM ; i++, y+=offset )
	{
		hall_fame_array[type][i].disp_info( x, y, i+1 );
	}

	mouse.wait_press(60);		// 60 seconds to time out

	vga_util.finish_disp_image_file();
}
예제 #2
0
파일: OGFILEA.cpp 프로젝트: Cap-Man/7kaa
void GameFileArray::init(const char *extStr)
{
	//------------- Read Hall of Fame ------------//

	if( !has_read_hall_of_fame )		// only read once, GameFileArray::init() is called every time the load/save game menu is brought up.
	{
		read_hall_of_fame();
		has_read_hall_of_fame = 1;
	}

	//-- Load all headers of all saved game files in current directory --//

	load_all_game_header(extStr);
}
예제 #3
0
파일: ogfilea.cpp 프로젝트: mecirt/7k2
//------ Begin of function GameFileArray::init ------//
//
// <char *>path - path of the save game, without '/' at the end
// <char *>extStr - extension of the save game
//
void GameFileArray::init(const char *path, const char *extStr)
{
	//------------- Read Hall of Fame ------------//

	if( !has_read_hall_of_fame )		// only read once, GameFileArray::init() is called every time the load/save game menu is brought up.
	{
		read_hall_of_fame();
		has_read_hall_of_fame = 1;
	}

	//-- Load all headers of all saved game files in current directory --//

	strcpy( save_default_dir, path );
	// REMOVE '/' at the end if any, 
	m.rtrim( save_default_dir);		// trim space at the end first
	int dirLen = strlen(save_default_dir);
	if( dirLen > 1 && save_default_dir[dirLen-1] == '/' )
		save_default_dir[dirLen-1] = '\0';

	strcpy( save_default_ext, extStr);

	load_all_game_header(save_default_dir, save_default_ext);
}