who[max_pet++] = pet_ctr;
}
- ang_sort(who, &dummy_why, max_pet, ang_sort_comp_pet_dismiss, ang_sort_swap_hook);
+ ang_sort(creature_ptr, who, &dummy_why, max_pet, ang_sort_comp_pet_dismiss, ang_sort_swap_hook);
/* Process the monsters (backwards) */
for (i = 0; i < max_pet; i++)
query = inkey();
prt(buf, 0, 0);
why = 2;
- ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
+ ang_sort(creature_ptr, who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
if (query == 'k') {
why = 4;
query = 'y';
}
if (why == 4) {
- ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
+ ang_sort(creature_ptr, who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
}
i = n - 1;
who[max_pet++] = pet_ctr;
}
- ang_sort(who, &dummy_why, max_pet, ang_sort_comp_pet, ang_sort_swap_hook);
+ ang_sort(user_ptr, who, &dummy_why, max_pet, ang_sort_comp_pet, ang_sort_swap_hook);
/* Process the monsters (backwards) */
for (i = 0; i < max_pet; i++)
for (QUEST_IDX i = 1; i < max_q_idx; i++)
quest_num[i] = i;
int dummy;
- ang_sort(quest_num, &dummy, max_q_idx, ang_sort_comp_quest_num, ang_sort_swap_quest_num);
+ ang_sort(creature_ptr, quest_num, &dummy, max_q_idx, ang_sort_comp_quest_num, ang_sort_swap_quest_num);
fputc('\n', fff);
do_cmd_knowledge_quests_completed(creature_ptr, fff, quest_num);
* @param fff ファイルポインタ
* @return なし
*/
-static void dump_aux_monsters(FILE *fff)
+static void dump_aux_monsters(player_type *creature_ptr, FILE *fff)
{
fprintf(fff, _("\n [倒したモンスター]\n\n", "\n [Defeated Monsters]\n\n"));
#endif
/* Sort the array by dungeon depth of monsters */
- ang_sort(who, &why, uniq_total, ang_sort_comp_hook, ang_sort_swap_hook);
+ ang_sort(creature_ptr, who, &why, uniq_total, ang_sort_comp_hook, ang_sort_swap_hook);
fprintf(fff, _("\n《上位%ld体のユニーク・モンスター》\n", "\n< Unique monsters top %ld >\n"), MIN(uniq_total, 10));
for (IDX k = uniq_total - 1; k >= 0 && k >= uniq_total - 10; k--)
dump_aux_recall(fff);
dump_aux_quest(creature_ptr, fff);
dump_aux_arena(creature_ptr, fff);
- dump_aux_monsters(fff);
+ dump_aux_monsters(creature_ptr, fff);
dump_aux_virtues(creature_ptr, fff);
dump_aux_race_history(creature_ptr, fff);
dump_aux_realm_history(creature_ptr, fff);
/* Sort by occurrence */
int dummy_why;
- ang_sort(templates, &dummy_why, num_temp, ang_sort_comp_cave_temp, ang_sort_swap_cave_temp);
+ ang_sort(player_ptr, templates, &dummy_why, num_temp, ang_sort_comp_cave_temp, ang_sort_swap_cave_temp);
/*** Dump templates ***/
/* Set the sort hooks */
if (mode & (TARGET_KILL))
{
- ang_sort(tmp_pos.x, tmp_pos.y, tmp_pos.n, ang_sort_comp_distance, ang_sort_swap_distance);
+ ang_sort(creature_ptr, tmp_pos.x, tmp_pos.y, tmp_pos.n, ang_sort_comp_distance, ang_sort_swap_distance);
}
else
{
- ang_sort(tmp_pos.x, tmp_pos.y, tmp_pos.n, ang_sort_comp_importance, ang_sort_swap_distance);
+ ang_sort(creature_ptr, tmp_pos.x, tmp_pos.y, tmp_pos.n, ang_sort_comp_importance, ang_sort_swap_distance);
}
if (creature_ptr->riding == 0 || !target_pet || (tmp_pos.n <= 1) || !(mode & (TARGET_KILL)))
}
}
- ang_sort(tmp_pos.x, tmp_pos.y, tmp_pos.n, ang_sort_comp_distance, ang_sort_swap_distance);
+ ang_sort(creature_ptr, tmp_pos.x, tmp_pos.y, tmp_pos.n, ang_sort_comp_distance, ang_sort_swap_distance);
}
}
u16b why = 3;
- ang_sort(who, &why, n, ang_sort_art_comp, ang_sort_art_swap);
+ ang_sort(player_ptr, who, &why, n, ang_sort_art_comp, ang_sort_art_swap);
for (ARTIFACT_IDX k = 0; k < n; k++)
{
artifact_type *a_ptr = &a_info[who[k]];
mon_idx[mon_cnt] = -1;
int dummy_why;
- ang_sort(mon_idx, &dummy_why, mon_cnt, ang_sort_comp_monster_level, ang_sort_swap_hook);
+ ang_sort(creature_ptr, mon_idx, &dummy_why, mon_cnt, ang_sort_comp_monster_level, ang_sort_swap_hook);
return mon_cnt;
}
}
u16b why = 2;
- ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
+ ang_sort(creature_ptr, who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
for (int k = 0; k < n; k++)
{
monster_race *r_ptr = &r_info[who[k]];
quest_num[i] = i;
int dummy;
- ang_sort(quest_num, &dummy, max_q_idx, ang_sort_comp_quest_num, ang_sort_swap_quest_num);
+ ang_sort(creature_ptr, quest_num, &dummy, max_q_idx, ang_sort_comp_quest_num, ang_sort_swap_quest_num);
do_cmd_knowledge_quests_current(creature_ptr, fff);
fputc('\n', fff);
unique_list_ptr->who[unique_list_ptr->n++] = i;
}
- ang_sort(unique_list_ptr->who, &unique_list_ptr->why, unique_list_ptr->n, ang_sort_comp_hook, ang_sort_swap_hook);
+ ang_sort(creature_ptr, unique_list_ptr->who, &unique_list_ptr->why, unique_list_ptr->n, ang_sort_comp_hook, ang_sort_swap_hook);
display_uniques(unique_list_ptr, fff);
C_KILL(unique_list_ptr->who, max_r_idx, s16b);
angband_fclose(fff);
char query = 'y';
if (why) {
- ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
+ ang_sort(player_ptr, who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
}
if (old_sym == sym && old_i < n)
* @param b 比較対象参照ID2
* TODO: to sort.c
*/
-static bool ang_sort_comp_nest_mon_info(vptr u, vptr v, int a, int b)
+static bool ang_sort_comp_nest_mon_info(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
- nest_mon_info_type *nest_mon_info = (nest_mon_info_type *)u;
+ /* Unused */
+ (void)player_ptr;
+ (void)v;
+
+ nest_mon_info_type *nest_mon_info = (nest_mon_info_type *)u;
MONSTER_IDX w1 = nest_mon_info[a].r_idx;
MONSTER_IDX w2 = nest_mon_info[b].r_idx;
monster_race *r1_ptr = &r_info[w1];
monster_race *r2_ptr = &r_info[w2];
int z1, z2;
- /* Unused */
- (void)v;
-
/* Extract used info */
z1 = nest_mon_info[a].used;
z2 = nest_mon_info[b].used;
* @param b スワップ対象参照ID2
* TODO: to sort.c
*/
-static void ang_sort_swap_nest_mon_info(vptr u, vptr v, int a, int b)
+static void ang_sort_swap_nest_mon_info(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
- nest_mon_info_type *nest_mon_info = (nest_mon_info_type *)u;
- nest_mon_info_type holder;
+ /* Unused */
+ (void)player_ptr;
+ (void)v;
- /* Unused */
- (void)v;
+ nest_mon_info_type *nest_mon_info = (nest_mon_info_type *)u;
+ nest_mon_info_type holder;
/* Swap */
holder = nest_mon_info[a];
if (cheat_room)
{
- ang_sort(nest_mon_info, NULL, NUM_NEST_MON_TYPE, ang_sort_comp_nest_mon_info, ang_sort_swap_nest_mon_info);
+ ang_sort(player_ptr, nest_mon_info, NULL, NUM_NEST_MON_TYPE, ang_sort_comp_nest_mon_info, ang_sort_swap_nest_mon_info);
/* Dump the entries (prevent multi-printing) */
for (i = 0; i < NUM_NEST_MON_TYPE; i++)
if (nest_mon_info[i].r_idx != nest_mon_info[i + 1].r_idx) break;
if (!nest_mon_info[i + 1].used) break;
}
+
msg_format_wizard(CHEAT_DUNGEON, "Nest構成モンスターNo.%d:%s", i, r_name + r_info[nest_mon_info[i].r_idx].name);
}
}
* @param ang_sort_swap スワップ用の関数ポインタ
* @return なし
*/
-static void exe_ang_sort(vptr u, vptr v, int p, int q, bool (*ang_sort_comp)(vptr, vptr, int, int), void (*ang_sort_swap)(vptr, vptr, int, int))
+static void exe_ang_sort(player_type *player_ptr, vptr u, vptr v, int p, int q, bool (*ang_sort_comp)(player_type *, vptr, vptr, int, int),
+ void (*ang_sort_swap)(player_type *, vptr, vptr, int, int))
{
if (p >= q)
return;
int b = q;
while (TRUE) {
/* Slide i2 */
- while (!(*ang_sort_comp)(u, v, b, z))
+ while (!(*ang_sort_comp)(player_ptr, u, v, b, z))
b--;
/* Slide i1 */
- while (!(*ang_sort_comp)(u, v, z, a))
+ while (!(*ang_sort_comp)(player_ptr, u, v, z, a))
a++;
if (a >= b)
break;
- (*ang_sort_swap)(u, v, a, b);
+ (*ang_sort_swap)(player_ptr, u, v, a, b);
a++, b--;
}
/* Recurse left side */
- exe_ang_sort(u, v, p, b, ang_sort_comp, ang_sort_swap);
+ exe_ang_sort(player_ptr, u, v, p, b, ang_sort_comp, ang_sort_swap);
/* Recurse right side */
- exe_ang_sort(u, v, b + 1, q, ang_sort_comp, ang_sort_swap);
+ exe_ang_sort(player_ptr, u, v, b + 1, q, ang_sort_comp, ang_sort_swap);
}
/*
* @param ang_sort_swap スワップ用の関数ポインタ
* @return なし
*/
-void ang_sort(vptr u, vptr v, int n, bool (*ang_sort_comp)(vptr, vptr, int, int), void (*ang_sort_swap)(vptr, vptr, int, int))
+void ang_sort(player_type *player_ptr, vptr u, vptr v, int n, bool (*ang_sort_comp)(player_type *, vptr, vptr, int, int),
+ void (*ang_sort_swap)(player_type *, vptr, vptr, int, int))
{
- exe_ang_sort(u, v, 0, n - 1, ang_sort_comp, ang_sort_swap);
+ exe_ang_sort(player_ptr, u, v, 0, n - 1, ang_sort_comp, ang_sort_swap);
}
/*
* We use "u" and "v" to point to arrays of "x" and "y" positions,
* and sort the arrays by double-distance to the player.
*/
-bool ang_sort_comp_distance(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_distance(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
POSITION *x = (POSITION *)(u);
POSITION *y = (POSITION *)(v);
/* Absolute distance components */
POSITION kx = x[a];
- kx -= p_ptr->x;
+ kx -= player_ptr->x;
kx = ABS(kx);
POSITION ky = y[a];
- ky -= p_ptr->y;
+ ky -= player_ptr->y;
ky = ABS(ky);
/* Approximate Double Distance to the first point */
/* Absolute distance components */
kx = x[b];
- kx -= p_ptr->x;
+ kx -= player_ptr->x;
kx = ABS(kx);
ky = y[b];
- ky -= p_ptr->y;
+ ky -= player_ptr->y;
ky = ABS(ky);
/* Approximate Double Distance to the first point */
* We use "u" and "v" to point to arrays of "x" and "y" positions,
* and sort the arrays by level of monster
*/
-bool ang_sort_comp_importance(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_importance(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
POSITION *x = (POSITION *)(u);
POSITION *y = (POSITION *)(v);
- grid_type *ca_ptr = &p_ptr->current_floor_ptr->grid_array[y[a]][x[a]];
- grid_type *cb_ptr = &p_ptr->current_floor_ptr->grid_array[y[b]][x[b]];
- monster_type *ma_ptr = &p_ptr->current_floor_ptr->m_list[ca_ptr->m_idx];
- monster_type *mb_ptr = &p_ptr->current_floor_ptr->m_list[cb_ptr->m_idx];
+ grid_type *ca_ptr = &player_ptr->current_floor_ptr->grid_array[y[a]][x[a]];
+ grid_type *cb_ptr = &player_ptr->current_floor_ptr->grid_array[y[b]][x[b]];
+ monster_type *ma_ptr = &player_ptr->current_floor_ptr->m_list[ca_ptr->m_idx];
+ monster_type *mb_ptr = &player_ptr->current_floor_ptr->m_list[cb_ptr->m_idx];
monster_race *ap_ra_ptr, *ap_rb_ptr;
/* The player grid */
- if (y[a] == p_ptr->y && x[a] == p_ptr->x)
+ if (y[a] == player_ptr->y && x[a] == player_ptr->x)
return TRUE;
- if (y[b] == p_ptr->y && x[b] == p_ptr->x)
+ if (y[b] == player_ptr->y && x[b] == player_ptr->x)
return FALSE;
/* Extract monster race */
}
/* An object get higher priority */
- if (p_ptr->current_floor_ptr->grid_array[y[a]][x[a]].o_idx && !p_ptr->current_floor_ptr->grid_array[y[b]][x[b]].o_idx)
+ if (player_ptr->current_floor_ptr->grid_array[y[a]][x[a]].o_idx && !player_ptr->current_floor_ptr->grid_array[y[b]][x[b]].o_idx)
return TRUE;
- if (!p_ptr->current_floor_ptr->grid_array[y[a]][x[a]].o_idx && p_ptr->current_floor_ptr->grid_array[y[b]][x[b]].o_idx)
+ if (!player_ptr->current_floor_ptr->grid_array[y[a]][x[a]].o_idx && player_ptr->current_floor_ptr->grid_array[y[b]][x[b]].o_idx)
return FALSE;
/* Priority from the terrain */
return FALSE;
/* If all conditions are same, compare distance */
- return ang_sort_comp_distance(u, v, a, b);
+ return ang_sort_comp_distance(player_ptr, u, v, a, b);
}
/*
* We use "u" and "v" to point to arrays of "x" and "y" positions,
* and sort the arrays by distance to the player.
*/
-void ang_sort_swap_distance(vptr u, vptr v, int a, int b)
+void ang_sort_swap_distance(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
+ /* Unused */
+ (void)player_ptr;
+
POSITION *x = (POSITION *)(u);
POSITION *y = (POSITION *)(v);
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform on "u".
*/
-bool ang_sort_art_comp(vptr u, vptr v, int a, int b)
+bool ang_sort_art_comp(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
+ /* Unused */
+ (void)player_ptr;
+
u16b *who = (u16b *)(u);
u16b *why = (u16b *)(v);
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform.
*/
-void ang_sort_art_swap(vptr u, vptr v, int a, int b)
+void ang_sort_art_swap(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
u16b *who = (u16b *)(u);
who[b] = holder;
}
-bool ang_sort_comp_quest_num(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_quest_num(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
QUEST_IDX *q_num = (QUEST_IDX *)u;
return (qa->comptime != qb->comptime) ? (qa->comptime < qb->comptime) : (qa->level <= qb->level);
}
-void ang_sort_swap_quest_num(vptr u, vptr v, int a, int b)
+void ang_sort_swap_quest_num(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
QUEST_IDX *q_num = (QUEST_IDX *)u;
* @param b 所持品ID2
* @return 1の方が大であればTRUE
*/
-bool ang_sort_comp_pet(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_pet(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)v;
int w1 = who[a];
int w2 = who[b];
- monster_type *m_ptr1 = &p_ptr->current_floor_ptr->m_list[w1];
- monster_type *m_ptr2 = &p_ptr->current_floor_ptr->m_list[w2];
+ monster_type *m_ptr1 = &player_ptr->current_floor_ptr->m_list[w1];
+ monster_type *m_ptr2 = &player_ptr->current_floor_ptr->m_list[w2];
monster_race *r_ptr1 = &r_info[m_ptr1->r_idx];
monster_race *r_ptr2 = &r_info[m_ptr2->r_idx];
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform on "u".
*/
-bool ang_sort_comp_hook(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_hook(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
+ /* Unused */
+ (void)player_ptr;
+
u16b *who = (u16b *)(u);
u16b *why = (u16b *)(v);
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform.
*/
-void ang_sort_swap_hook(vptr u, vptr v, int a, int b)
+void ang_sort_swap_hook(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
u16b *who = (u16b *)(u);
/*
* hook function to sort monsters by level
*/
-bool ang_sort_comp_monster_level(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_monster_level(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
u16b *who = (u16b *)(u);
* @param b 比較対象のモンスターID2
* @return 2番目が大ならばTRUEを返す
*/
-bool ang_sort_comp_pet_dismiss(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_pet_dismiss(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)v;
int w1 = who[a];
int w2 = who[b];
- monster_type *m_ptr1 = &p_ptr->current_floor_ptr->m_list[w1];
- monster_type *m_ptr2 = &p_ptr->current_floor_ptr->m_list[w2];
+ monster_type *m_ptr1 = &player_ptr->current_floor_ptr->m_list[w1];
+ monster_type *m_ptr2 = &player_ptr->current_floor_ptr->m_list[w2];
monster_race *r_ptr1 = &r_info[m_ptr1->r_idx];
monster_race *r_ptr2 = &r_info[m_ptr2->r_idx];
- if (w1 == p_ptr->riding)
+ if (w1 == player_ptr->riding)
return TRUE;
- if (w2 == p_ptr->riding)
+ if (w2 == player_ptr->riding)
return FALSE;
if (m_ptr1->nickname && !m_ptr2->nickname)
* @param b スワップするモンスター種族のID2
* @return aの方が大きければtrue
*/
-bool ang_sort_comp_cave_temp(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_cave_temp(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
grid_template_type *who = (grid_template_type *)(u);
* @param b スワップするモンスター種族のID2
* @return なし
*/
-void ang_sort_swap_cave_temp(vptr u, vptr v, int a, int b)
+void ang_sort_swap_cave_temp(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
grid_template_type *who = (grid_template_type *)(u);
* @param b 比較したいモンスター種族ID2
* @return 2が大きければTRUEを返す
*/
-bool ang_sort_comp_evol_tree(vptr u, vptr v, int a, int b)
+bool ang_sort_comp_evol_tree(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
int **evol_tree = (int **)u;
* @param b スワップしたい木構造2
* @return 2が大きければTRUEを返す
*/
-void ang_sort_swap_evol_tree(vptr u, vptr v, int a, int b)
+void ang_sort_swap_evol_tree(player_type *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
+ (void)player_ptr;
(void)v;
int **evol_tree = (int **)u;
#include "system/angband.h"
-void ang_sort(vptr u, vptr v, int n, bool(*ang_sort_comp)(vptr, vptr, int, int), void(*ang_sort_swap)(vptr, vptr, int, int));
+void ang_sort(player_type *player_ptr, vptr u, vptr v, int n, bool (*ang_sort_comp)(player_type *, vptr, vptr, int, int),
+ void (*ang_sort_swap)(player_type *, vptr, vptr, int, int));
-bool ang_sort_comp_distance(vptr u, vptr v, int a, int b);
-bool ang_sort_comp_importance(vptr u, vptr v, int a, int b);
-void ang_sort_swap_distance(vptr u, vptr v, int a, int b);
+bool ang_sort_comp_distance(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_importance(player_type *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_distance(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_art_comp(vptr u, vptr v, int a, int b);
-void ang_sort_art_swap(vptr u, vptr v, int a, int b);
+bool ang_sort_art_comp(player_type *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_art_swap(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_quest_num(vptr u, vptr v, int a, int b);
-void ang_sort_swap_quest_num(vptr u, vptr v, int a, int b);
+bool ang_sort_comp_quest_num(player_type *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_quest_num(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_pet(vptr u, vptr v, int a, int b);
+bool ang_sort_comp_pet(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_hook(vptr u, vptr v, int a, int b);
-void ang_sort_swap_hook(vptr u, vptr v, int a, int b);
+bool ang_sort_comp_hook(player_type *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_hook(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_monster_level(vptr u, vptr v, int a, int b);
-bool ang_sort_comp_pet_dismiss(vptr u, vptr v, int a, int b);
+bool ang_sort_comp_monster_level(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_pet_dismiss(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_cave_temp(vptr u, vptr v, int a, int b);
-void ang_sort_swap_cave_temp(vptr u, vptr v, int a, int b);
+bool ang_sort_comp_cave_temp(player_type *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_cave_temp(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_evol_tree(vptr u, vptr v, int a, int b);
-void ang_sort_swap_evol_tree(vptr u, vptr v, int a, int b);
+bool ang_sort_comp_evol_tree(player_type *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_evol_tree(player_type *player_ptr, vptr u, vptr v, int a, int b);
* @param fname 生成ファイル名
* @return なし
*/
-static void spoil_mon_desc(concptr fname)
+static void spoil_mon_desc(player_type *player_ptr, concptr fname)
{
int i, n = 0;
u16b why = 2;
who[n++] = (s16b)i;
}
- ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
+ ang_sort(player_ptr, who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
for (i = 0; i < n; i++) {
monster_race *r_ptr = &r_info[who[i]];
concptr name = (r_name + r_ptr->name);
who[n++] = (s16b)i;
}
- ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
+ ang_sort(player_ptr, who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
for (l = 0; l < n; l++) {
monster_race *r_ptr = &r_info[who[l]];
flags1 = r_ptr->flags1;
* @param fname 出力ファイル名
* @return なし
*/
-static void spoil_mon_evol(concptr fname)
+static void spoil_mon_evol(player_type *player_ptr, concptr fname)
{
char buf[1024];
monster_race *r_ptr;
}
}
- ang_sort(evol_tree, NULL, max_r_idx, ang_sort_comp_evol_tree, ang_sort_swap_evol_tree);
+ ang_sort(player_ptr, evol_tree, NULL, max_r_idx, ang_sort_comp_evol_tree, ang_sort_swap_evol_tree);
for (i = 0; i < max_r_idx; i++) {
r_idx = evol_tree[i][0];
if (!r_idx)
spoil_artifact(player_ptr, "artifact.txt");
break;
case '3':
- spoil_mon_desc("mon-desc.txt");
+ spoil_mon_desc(player_ptr, "mon-desc.txt");
break;
case '4':
spoil_mon_info(player_ptr, "mon-info.txt");
break;
case '5':
- spoil_mon_evol("mon-evol.txt");
+ spoil_mon_evol(player_ptr, "mon-evol.txt");
break;
default:
bell();