예제 #1
0
/**
 * @brief Console commands to read the comments from savegames
 * @note The comment is the part of the savegame header that you type in at saving
 * for reidentifying the savegame
 * @sa SAV_GameLoad_f
 * @sa SAV_GameLoad
 * @sa SAV_GameSaveNameCleanup_f
 * @sa SAV_GameReadGameComment
 */
static void SAV_GameReadGameComments_f (void)
{
	if (Cmd_Argc() == 2) {
		int idx = atoi(Cmd_Argv(1));
		SAV_GameReadGameComment(idx);
	} else {
		int i;
		/* read all game comments */
		for (i = 0; i < 8; i++) {
			SAV_GameReadGameComment(i);
		}
	}
}
예제 #2
0
파일: cp_save.cpp 프로젝트: AresAndy/ufoai
/**
 * @brief Console commands to read the comments from savegames
 * @note The comment is the part of the savegame header that you type in at saving
 * for reidentifying the savegame
 * @sa SAV_GameLoad_f
 * @sa SAV_GameLoad
 * @sa SAV_GameSaveNameCleanup_f
 * @sa SAV_GameReadGameComment
 */
static void SAV_GameReadGameComments_f (void)
{
	if (cgi->Cmd_Argc() < 1) {
		Com_Printf("usage: %s {id}\n", cgi->Cmd_Argv(0));
		return;
	}

	if (cgi->Cmd_Argc() == 2) {
		int idx = atoi(cgi->Cmd_Argv(1));
		SAV_GameReadGameComment(idx);
	} else {
		/* read all game comments */
		for (int i = 0; i < 8; i++) {
			SAV_GameReadGameComment(i);
		}
	}
}