void do_cmd_diary(player_type *creature_ptr)
{
screen_save();
- int i;
while (TRUE) {
term_clear();
prt(_("[ 記録の設定 ]", "[ Play Record ]"), 2, 0);
prt(_("(4) 記録を消去する", "(4) Delete your record"), 7, 5);
prt(_("(R) プレイ動画を記録する/中止する", "(R) Record playing movie / or stop it"), 9, 5);
prt(_("コマンド:", "Command: "), 18, 0);
- i = inkey();
+ int i = inkey();
if (i == ESCAPE)
break;
/*!
* @brief 1ゲームプレイの主要ルーチン / Actually play a game
+ * @param player_ptr プレーヤーへの参照ポインタ
+ * @param new_game 新規にゲームを始めたかどうか
+ * @param browsing_movie ムービーモードか
* @return なし
* @note
* If the "new_game" parameter is true, then, after loading the
* savefile, we will commit suicide, if necessary, to allow the
* player to start a new game.
*/
-void play_game(player_type *player_ptr, bool new_game)
+void play_game(player_type *player_ptr, bool new_game, bool browsing_movie)
{
bool load_game = TRUE;
bool init_random_seed = FALSE;
#include "system/angband.h"
-void play_game(player_type* player_ptr, bool new_game);
+void play_game(player_type* player_ptr, bool new_game, bool browsing_movie);
return TRUE;
}
-void prepare_browse_movie_aux(concptr filename)
+void prepare_browse_movie_without_path_build(concptr filename)
{
movie_fd = fd_open(filename, O_RDONLY);
-
- browsing_movie = TRUE;
-
init_buffer();
}
}
#ifndef WINDOWS
-void prepare_browse_movie(concptr filename)
+void prepare_browse_movie_with_path_build(concptr filename)
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, filename);
-
prepare_browse_movie_aux(buf);
}
#endif
#include "system/angband.h"
void prepare_movie_hooks(player_type *player_ptr);
-void prepare_browse_movie_aux(concptr filename);
+void prepare_browse_movie_without_path_build(concptr filename);
void browse_movie(void);
#ifndef WINDOWS
-void prepare_browse_movie(concptr filename);
+void prepare_browse_movie_with_path_build(concptr filename);
#endif WINDOWS
static char *proxy;
static int proxy_port;
-bool browsing_movie;
-
/* プロキシサーバのアドレスををファイルから読んで設定する */
void set_proxy(char *default_url, int default_port)
{
#include "system/angband.h"
-extern bool browsing_movie;
-
int soc_write(int sd, char *buf, size_t sz);
int soc_read(int sd, char *buf, size_t sz);
void set_proxy(char *default_url, int default_port);
strcat(savefile, s);
validate_file(savefile);
game_in_progress = TRUE;
- play_game(player_ptr, FALSE);
+ play_game(player_ptr, FALSE, FALSE);
}
/*
} else {
game_in_progress = TRUE;
term_flush();
- play_game(player_ptr, TRUE);
+ play_game(player_ptr, TRUE, FALSE);
quit(NULL);
}
validate_file(savefile);
game_in_progress = TRUE;
term_flush();
- play_game(player_ptr, FALSE);
+ play_game(player_ptr, FALSE, FALSE);
quit(NULL);
}
}
ofn.Flags = OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR;
if (GetOpenFileName(&ofn)) {
- prepare_browse_movie_aux(savefile);
- play_game(player_ptr, FALSE);
+ prepare_browse_movie_without_path_build(savefile);
+ play_game(player_ptr, FALSE, TRUE);
quit(NULL);
return;
}
#endif /* SET_UID */
/* Process the command line arguments */
+ bool browsing_movie = FALSE;
for (i = 1; args && (i < argc); i++) {
/* Require proper options */
if (argv[i][0] != '-') {
break;
}
- prepare_browse_movie(&argv[i][2]);
+ prepare_browse_movie_with_path_build(&argv[i][2]);
+ browsing_movie = TRUE;
break;
}
case '-': {
pause_line(23);
/* Play the game */
- play_game(p_ptr, new_game);
+ play_game(p_ptr, new_game, browsing_movie);
/* Quit */
quit(NULL);