• R/O
  • SSH
  • HTTPS

angband65: Commit


Commit MetaInfo

Revision151 (tree)
Zeit2009-05-17 05:00:59
Autorpaulblay

Log Message

Interim "bug hunt" commit. See #16761 Game crash when moving.

Ändern Zusammenfassung

Diff

--- trunk/Angband65/src/defines.h (revision 150)
+++ trunk/Angband65/src/defines.h (revision 151)
@@ -1295,9 +1295,9 @@
12951295 #define PR_MONSTER 0x00400000L /* Display monster recall */
12961296 #define PR_OBJECT 0x00800000L /* Display object recall */
12971297 #define PR_MONLIST 0x01000000L /* Display monster list */
1298-#define PR_BUTTONS 0x02000000L /* Display mouse buttons */
1299-#define PR_ITEMLIST 0x04000000L /* Display item list */
1300-#define PR_READ 0x08000000L /* TODO Make this work */
1298+#define PR_BUTTONS 0x02000000L /* Display mouse buttons */
1299+#define PR_READ 0x04000000L /* TODO Make this work */
1300+#define PR_ITEMLIST 0x08000000L /* Display item list */
13011301
13021302 /* Display Basic Info */
13031303 #define PR_BASIC \
@@ -1309,7 +1309,6 @@
13091309 #define PR_EXTRA \
13101310 (PR_STATUS | PR_STATE | PR_STUDY)
13111311
1312-
13131312 /*
13141313 * Bit flags for the "p_ptr->window" variable.
13151314 */
--- trunk/Angband65/src/game-event.h (revision 150)
+++ trunk/Angband65/src/game-event.h (revision 151)
@@ -25,6 +25,7 @@
2525 EVENT_STATE, /* The three 'R's: Resting, Repeating and
2626 Searching */
2727 EVENT_MOUSEBUTTONS, /* Displayed mouse buttons need changing */
28+ EVENT_READING, /* Player is reading a spell page */
2829
2930 EVENT_PLAYERMOVED,
3031
--- trunk/Angband65/src/player/calcs.c (revision 150)
+++ trunk/Angband65/src/player/calcs.c (revision 151)
@@ -29,6 +29,8 @@
2929 * Note that this function induces various "status" messages,
3030 * which must be bypasses until the character is created.
3131 */
32+/* TODO Is this needed ? */
33+#if 0
3234 static void calc_spells(void)
3335 {
3436 int i, j, k, levels;
@@ -214,8 +216,8 @@
214216 p_ptr->redraw |= (PR_STUDY | PR_OBJECT);
215217 }
216218 }
219+#endif
217220
218-
219221 /*
220222 * Calculate maximum mana. You do not need to know any spells.
221223 * Note that mana is lowered by heavy (or inappropriate) armor.
@@ -1441,13 +1443,12 @@
14411443 calc_mana();
14421444 }
14431445
1446+/* TODO Is PU_SPELLS needed now? */
14441447 if (p_ptr->update & (PU_SPELLS))
14451448 {
14461449 p_ptr->update &= ~(PU_SPELLS);
1447- calc_spells();
14481450 }
14491451
1450-
14511452 /* Character is not ready yet, no screen updates */
14521453 if (!character_generated) return;
14531454
@@ -1526,16 +1527,17 @@
15261527 { PR_SPEED, EVENT_PLAYERSPEED },
15271528 { PR_STATE, EVENT_STATE },
15281529 { PR_STATUS, EVENT_STATUS },
1529- { PR_STUDY, EVENT_STUDYSTATUS },
1530+ { PR_STUDY, EVENT_STUDYSTATUS }, /* TODO Is this needed? */
15301531 { PR_DTRAP, EVENT_DETECTIONSTATUS },
15311532 { PR_BUTTONS, EVENT_MOUSEBUTTONS },
1532-
1533- { PR_INVEN, EVENT_INVENTORY },
1534- { PR_EQUIP, EVENT_EQUIPMENT },
1535- { PR_MONLIST, EVENT_MONSTERLIST },
1533+ { PR_READ, EVENT_READING },
1534+
1535+ { PR_INVEN, EVENT_INVENTORY },
1536+ { PR_EQUIP, EVENT_EQUIPMENT },
1537+ { PR_MONLIST, EVENT_MONSTERLIST },
15361538 { PR_ITEMLIST, EVENT_ITEMLIST },
1537- { PR_MONSTER, EVENT_MONSTERTARGET },
1538- { PR_MESSAGE, EVENT_MESSAGE },
1539+ { PR_MONSTER, EVENT_MONSTERTARGET },
1540+ { PR_MESSAGE, EVENT_MESSAGE },
15391541 };
15401542
15411543 /*
--- trunk/Angband65/src/cmd5.c (revision 150)
+++ trunk/Angband65/src/cmd5.c (revision 151)
@@ -1417,49 +1417,6 @@
14171417 }
14181418 #endif
14191419
1420-#if 0 /* Not needed anymore? */
1421-/*
1422- * Learn the specified spell.
1423- */
1424-void spell_learn(int spell)
1425-{
1426- int i;
1427- cptr p = ((p_ptr->spell_stat == A_INT) ? "spell" : "prayer");
1428-
1429- /* Learn the spell */
1430- p_ptr->spell_flags[spell] |= PY_SPELL_LEARNED;
1431-
1432- /* Find the next open entry in "spell_order[]" */
1433- for (i = 0; i < PY_MAX_SPELLS; i++)
1434- {
1435- /* Stop at the first empty space */
1436- if (p_ptr->spell_order[i] == 99) break;
1437- }
1438-
1439- /* Add the spell to the known list */
1440- ISBYTE(spell);
1441- p_ptr->spell_order[i] = (byte) spell;
1442-
1443- /* Mention the result */
1444- message_format(MSG_STUDY, 0, "You have learned the %s of %s.",
1445- p, get_spell_name(spell));
1446-
1447- /* One less spell available */
1448- p_ptr->new_spells--;
1449-
1450- /* Message if needed */
1451- if (p_ptr->new_spells)
1452- {
1453- /* Message */
1454- msg_format("You can learn %d more %s%s.",
1455- p_ptr->new_spells, p, PLURAL(p_ptr->new_spells));
1456- }
1457-
1458- /* Redraw Study Status */
1459- p_ptr->redraw |= (PR_STUDY | PR_OBJECT);
1460-}
1461-#endif
1462-
14631420 /* Cast the specified spell */
14641421 bool spell_cast(int spell)
14651422 {
--- trunk/Angband65/src/xtra3.c (revision 150)
+++ trunk/Angband65/src/xtra3.c (revision 151)
@@ -54,10 +54,11 @@
5454 game_event_type statusline_events[] =
5555 {
5656 EVENT_STUDYSTATUS,
57- EVENT_STATUS,
57+ EVENT_STATUS, /* TODO Can EVENT_STATUS go? */
5858 EVENT_DETECTIONSTATUS,
5959 EVENT_STATE,
60- EVENT_MOUSEBUTTONS
60+ EVENT_MOUSEBUTTONS,
61+ EVENT_READING
6162 };
6263
6364
--- trunk/Angband65/src/spells2.c (revision 150)
+++ trunk/Angband65/src/spells2.c (revision 151)
@@ -3465,8 +3465,6 @@
34653465 return (project_hook(GF_AWAY_ALL, dir, MAX_SIGHT * 5, flg));
34663466 }
34673467
3468-
3469-
34703468 /*
34713469 * Hooks -- affect adjacent grids (radius 1 ball attack)
34723470 */
Show on old repository browser