/* Purpose: Angband utilities -BEN- */
#include "angband.h"
+#include "util.h"
#include "monsterrace-hook.h"
+#include "quest.h"
static int num_more = 0;
{
/* Skip the backslash */
str++;
-
- /* Paranoia */
if (!(*str)) break;
/* Macro Trigger */
/* No sound */
if (!use_music) return;
- if(ambush_flag)
+ if(p_ptr->ambush_flag)
{
play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_AMBUSH);
return;
{ // TODO マクロで類似条件を統合すること
if(quest[i].status == QUEST_STATUS_TAKEN &&
(quest[i].type == QUEST_TYPE_KILL_LEVEL || quest[i].type == QUEST_TYPE_RANDOM) &&
- quest[i].level == dun_level && dungeon_type == quest[i].dungeon)
+ quest[i].level == current_floor_ptr->dun_level && p_ptr->dungeon_idx == quest[i].dungeon)
{
if(play_music(TERM_XTRA_MUSIC_QUEST, i))
{
}
}
- if(dungeon_type)
+ if(p_ptr->dungeon_idx)
{
if(p_ptr->feeling == 2) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_FEEL2);
else if(p_ptr->feeling >= 3 && p_ptr->feeling <= 5) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_FEEL1);
else
{
- if(play_music(TERM_XTRA_MUSIC_DUNGEON, dungeon_type))
+ if(play_music(TERM_XTRA_MUSIC_DUNGEON, p_ptr->dungeon_idx))
{
- if(dun_level < 40) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_LOW);
- else if(dun_level < 80) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_MED);
+ if(current_floor_ptr->dun_level < 40) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_LOW);
+ else if(current_floor_ptr->dun_level < 80) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_MED);
else play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DUN_HIGH);
}
}
return;
}
- if(!dun_level)
+ if(!current_floor_ptr->dun_level)
{
if(p_ptr->lev >= 45) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FIELD3);
else if(p_ptr->lev >= 25) play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FIELD2);
byte a = TERM_L_BLUE;
bool nagasu = FALSE;
- if ((auto_more && !now_damaged) || num_more < 0){
+ if ((auto_more && !p_ptr->now_damaged) || num_more < 0){
int i;
for (i = 0; i < 8; i++)
{
nagasu = TRUE;
}
}
- now_damaged = FALSE;
+ p_ptr->now_damaged = FALSE;
if (!p_ptr->playing || !nagasu)
{
char *t;
char buf[1024];
- if (world_monster) return;
+ if (current_world_ptr->timewalk_m_idx) return;
/* Hack -- Reset */
if (!msg_flag) {
/* No message */
if (!msg) return;
-
- /* Paranoia */
if (n > 1000) return;
/* Copy it */
}
else
{
- sprintf(buf, ("T:%d - %s"), (int)turn, msg);
+ sprintf(buf, ("T:%d - %s"), (int)current_world_ptr->game_turn, msg);
}
/* New Message Length */
bool get_string(concptr prompt, char *buf, int len)
{
bool res;
-
- /* Paranoia */
msg_print(NULL);
/* Display prompt */
handle_stuff();
num_more = 0;
}
-
- /* Paranoia */
msg_print(NULL);
if (!rogue_like_commands)
*/
bool get_com(concptr prompt, char *command, bool z_escape)
{
- /* Paranoia */
msg_print(NULL);
/* Display a prompt */
/* Use that prompt */
prompt = tmp;
}
-
- /* Paranoia */
msg_print(NULL);
/* Display prompt */
if (p_ptr->pclass == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
break;
case MENU_WILD:
- if (!dun_level && !p_ptr->inside_arena && !p_ptr->inside_quest)
+ if (!current_floor_ptr->dun_level && !p_ptr->inside_arena && !p_ptr->inside_quest)
{
if ((byte)p_ptr->wild_mode == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
}
continue;
}
-
- /* Paranoia */
if (!cmd) continue;
}
}
}
-
- /* Paranoia */
if (d == 5) d = 0;
/* Return direction */
size_t len = strlen(src);
size_t ret = len;
-
- /* Paranoia */
if (bufsize == 0) return ret;
/* Truncate */