set_action(creature_ptr, ACTION_NONE);
/* Message text of each song or etc. */
- exe_spell(creature_ptr, REALM_MUSIC, SINGING_SONG_ID(creature_ptr), SPELL_STOP);
+ exe_spell(creature_ptr, REALM_MUSIC, get_singing_song_id(creature_ptr), SPELL_STOP);
set_singing_song_effect(creature_ptr, MUSIC_NONE);
- SINGING_SONG_ID(creature_ptr) = 0;
+ set_singing_song_id(creature_ptr, 0);
set_bits(creature_ptr->update, PU_BONUS);
set_bits(creature_ptr->redraw, PR_STATUS);
}
{
creature_ptr->magic_num1[2] = magic_num;
}
+
+MAGIC_NUM2 get_singing_song_id(player_type* creature_ptr)
+{
+ return creature_ptr->magic_num2[0];
+}
+
+void set_singing_song_id(player_type* creature_ptr, MAGIC_NUM2 magic_num)
+{
+ creature_ptr->magic_num2[0] = magic_num;
+}
bool music_singing(player_type *caster_ptr, int music_songs);
bool music_singing_any(player_type *creature_ptr);
-// @todo 後で普通の関数に直す
MAGIC_NUM1 get_singing_song_effect(player_type *creature_ptr);
void set_singing_song_effect(player_type *creature_ptr, MAGIC_NUM1 magic_num);
MAGIC_NUM1 get_interrupting_song_effect(player_type *creature_ptr);
void set_interrupting_song_effect(player_type *creature_ptr, MAGIC_NUM1 magic_num);
MAGIC_NUM1 get_singing_count(player_type *creature_ptr);
void set_singing_count(player_type *creature_ptr, MAGIC_NUM1 magic_num);
-#define SINGING_SONG_ID(P_PTR) ((P_PTR)->magic_num2[0])
+MAGIC_NUM2 get_singing_song_id(player_type *creature_ptr);
+void set_singing_song_id(player_type *creature_ptr, MAGIC_NUM2 magic_num);
exe_spell(caster_ptr, REALM_HEX, spell, SPELL_STOP);
casting_hex_flags(caster_ptr) &= ~(1UL << spell);
casting_hex_num(caster_ptr)--;
- if (!SINGING_SONG_ID(caster_ptr))
+ if (get_singing_song_id(caster_ptr) == 0)
set_action(caster_ptr, ACTION_NONE);
}
}
set_singing_song_effect(caster_ptr, song);
/* Remember the index of the spell which activated the song */
- SINGING_SONG_ID(caster_ptr) = (MAGIC_NUM2)spell;
+ set_singing_song_id(caster_ptr, (MAGIC_NUM2)spell);
/* Now the player is singing */
set_action(caster_ptr, ACTION_SING);
return;
}
- int spell = SINGING_SONG_ID(caster_ptr);
+ int spell = get_singing_song_id(caster_ptr);
const magic_type *s_ptr;
s_ptr = &technic_info[REALM_MUSIC - MIN_TECHNIC][spell];
if (creature_ptr->pclass == CLASS_BARD) {
set_singing_song_effect(creature_ptr, MUSIC_NONE);
- SINGING_SONG_ID(creature_ptr) = 0;
+ set_singing_song_id(creature_ptr, 0);
}
}