• R/O
  • SSH
  • HTTPS

angband65: Commit


Commit MetaInfo

Revision156 (tree)
Zeit2009-05-21 16:56:35
Autorpaulblay

Log Message

Now up to date with Vanilla Angband Changeset 1404. Also removed a compiler warning concerning keypress_h.

Ändern Zusammenfassung

Diff

--- trunk/Angband65/src/externs.h (revision 155)
+++ trunk/Angband65/src/externs.h (revision 156)
@@ -644,7 +644,7 @@
644644 extern void text_out_e(const char *fmt, ...);
645645 extern void clear_from(s16b row);
646646 extern bool askfor_aux_keypress(char *buf, size_t buflen, size_t *curs, size_t *len, char keypress, bool firsttime);
647-extern bool askfor_aux(char *buf, size_t len, bool keypress_h(char *, size_t, size_t *, size_t *, char, bool));
647+extern bool askfor_aux(char *buf, size_t len, bool (*keypress_h)(char *, size_t, size_t *, size_t *, char, bool));
648648 extern bool get_string(cptr prompt, char *buf, size_t len);
649649 extern s16b get_quantity(cptr prompt, int max);
650650 extern bool get_check(cptr prompt);
--- trunk/Angband65/src/util.c (revision 155)
+++ trunk/Angband65/src/util.c (revision 156)
@@ -2373,8 +2373,7 @@
23732373 * 'askfor_aux_keypress' (the default handler if you supply NULL for
23742374 * 'keypress_h') for an example.
23752375 */
2376-bool askfor_aux(char *buf, size_t len, bool keypress_h(char *, size_t, size_t *, size_t *, char, bool))
2377-
2376+bool askfor_aux(char *buf, size_t len, bool (*keypress_h)(char *, size_t, size_t *, size_t *, char, bool))
23782377 {
23792378 s16b y, x;
23802379
--- trunk/Angband65/src/player/calcs.c (revision 155)
+++ trunk/Angband65/src/player/calcs.c (revision 156)
@@ -309,7 +309,7 @@
309309 /*
310310 * Calculate the blows a player would get, in current condition, wielding "o_ptr".
311311 */
312-static int calc_blows(const object_type *o_ptr)
312+static int calc_blows(const object_type *o_ptr, player_state *state)
313313 {
314314 int blows;
315315 int str_index, dex_index;
@@ -319,7 +319,7 @@
319319 div = ((o_ptr->weight < cp_ptr->min_weight) ? cp_ptr->min_weight : o_ptr->weight);
320320
321321 /* Get the strength vs weight */
322- str_index = adj_str_blow[p_ptr->state.stat_ind[A_STR]] *
322+ str_index = adj_str_blow[state->stat_ind[A_STR]] *
323323 cp_ptr->att_multiply / div;
324324
325325 /* Maximal value */
@@ -326,7 +326,7 @@
326326 if (str_index > 11) str_index = 11;
327327
328328 /* Index by dexterity */
329- dex_index = MIN(adj_dex_blow[p_ptr->state.stat_ind[A_DEX]], 11);
329+ dex_index = MIN(adj_dex_blow[state->stat_ind[A_DEX]], 11);
330330
331331 /* Use the blows table */
332332 blows = MIN(blows_table[str_index][dex_index], cp_ptr->max_attacks);
@@ -991,7 +991,7 @@
991991 if (o_ptr->k_idx && !state->heavy_wield)
992992 {
993993 /* Calculate number of blows */
994- state->num_blow = INT2S16B(calc_blows(o_ptr) + extra_blows);
994+ state->num_blow = INT2S16B(calc_blows(o_ptr, state) + extra_blows);
995995
996996 /* Boost digging skill by weapon weight */
997997 state->skills[SKILL_DIGGING] += (o_ptr->weight / 10);
Show on old repository browser