Changeset 930
- Timestamp:
- 05/17/08 11:34:20 (4 months ago)
- Files:
-
- trunk/src/birth.c (modified) (1 diff)
- trunk/src/cave.c (modified) (1 diff)
- trunk/src/cmd0.c (modified) (3 diffs)
- trunk/src/cmd3.c (modified) (1 diff)
- trunk/src/game-event.c (modified) (1 diff)
- trunk/src/loadsave.c (modified) (1 diff)
- trunk/src/save.c (modified) (2 diffs)
- trunk/src/spells2.c (modified) (2 diffs)
- trunk/src/store.c (modified) (1 diff)
- trunk/src/wiz-stats.c (modified) (1 diff)
- trunk/src/xtra1.c (modified) (3 diffs)
- trunk/src/z-util.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/birth.c
r918 r930 119 119 { 120 120 int i; 121 121 122 122 /* The initialisation is just paranoia - structure assignment is 123 123 (perhaps) not strictly defined to work with uninitialised parts 124 124 of structures. */ 125 birther temp = { 0 }; 125 birther temp; 126 WIPE(&temp, birther); 126 127 127 128 /*** Save the current data if we'll need it later ***/ trunk/src/cave.c
r918 r930 2241 2241 static bool ang_sort_comp_hook_longs(const void *u, const void *v, int a, int b) 2242 2242 { 2243 long *x = ( long*)(u);2243 long *x = (const long *)(u); 2244 2244 2245 2245 /* Unused parameter */ trunk/src/cmd0.c
r918 r930 420 420 const command_type *commands = menu->menu_data; 421 421 422 (void)width; 423 422 424 /* Write the description */ 423 425 Term_putstr(col, row, -1, attr, commands[oid].desc); … … 445 447 static bool cmd_sub_action(char cmd, void *db, int oid) 446 448 { 449 (void)db; 450 (void)oid; 451 447 452 /* Only handle enter */ 448 453 if (cmd == '\n' || cmd == '\r') 449 {450 454 return TRUE; 451 }452 455 else 453 {454 456 return FALSE; 455 }456 457 } 457 458 … … 518 519 { 519 520 byte attr = (cursor ? TERM_L_BLUE : TERM_WHITE); 521 (void)menu; 522 (void)width; 520 523 Term_putstr(col, row, -1, attr, cmds_all[oid].name); 521 524 } trunk/src/cmd3.c
r918 r930 714 714 bool ang_sort_comp_hook(const void *u, const void *v, int a, int b) 715 715 { 716 u16b *who = (u16b*)(u); 717 718 u16b *why = (u16b*)(v); 716 u16b *who = (const u16b *)(u); 717 u16b *why = (const u16b *)(v); 719 718 720 719 int w1 = who[a]; trunk/src/game-event.c
r918 r930 93 93 void event_add_handler_set(game_event_type *type, size_t n_types, game_event_handler *fn, void *user) 94 94 { 95 int i;95 size_t i; 96 96 97 97 for (i = 0; i < n_types; i++) 98 {99 98 event_add_handler(type[i], fn, user); 100 }101 99 } 102 100 103 101 void event_remove_handler_set(game_event_type *type, size_t n_types, game_event_handler *fn, void *user) 104 102 { 105 int i;103 size_t i; 106 104 107 105 for (i = 0; i < n_types; i++) 108 {109 106 event_remove_handler(type[i], fn, user); 110 }111 107 } 112 108 trunk/src/loadsave.c
r928 r930 1237 1237 { 1238 1238 for (j = 0; j < DUNGEON_WID; j++) 1239 cave_set_feat(i, j, *(( byte *)(buf + (i * DUNGEON_WID) + j)));1239 cave_set_feat(i, j, *((const byte *)(buf + (i * DUNGEON_WID) + j))); 1240 1240 } 1241 1241 trunk/src/save.c
r918 r930 815 815 u32b tmp32u; 816 816 817 u32b tmp32v; 818 817 819 /* Guess at the current time */ 818 820 now = time((time_t *)0); … … 1001 1003 1002 1004 /* Dump the history entries one-by-one */ 1003 for ( i = 0; i < tmp32u; i++)1004 { 1005 wr_u16b(history_list[ i].type);1006 wr_s32b(history_list[ i].turn);1007 wr_s16b(history_list[ i].dlev);1008 wr_s16b(history_list[ i].clev);1009 wr_byte(history_list[ i].a_idx);1010 wr_string(history_list[ i].event);1005 for (tmp32v = 0; tmp32v < tmp32u; tmp32v++) 1006 { 1007 wr_u16b(history_list[tmp32v].type); 1008 wr_s32b(history_list[tmp32v].turn); 1009 wr_s16b(history_list[tmp32v].dlev); 1010 wr_s16b(history_list[tmp32v].clev); 1011 wr_byte(history_list[tmp32v].a_idx); 1012 wr_string(history_list[tmp32v].event); 1011 1013 } 1012 1014 trunk/src/spells2.c
r918 r930 1016 1016 bool detect = FALSE; 1017 1017 1018 (void)aware; 1019 1018 1020 /* Pick an area to map */ 1019 1021 y1 = p_ptr->py - DETECT_DIST_Y; … … 1056 1058 } 1057 1059 1058 /* Rescan the map for the new dtrap edge */ 1059 for (y = y1 -1; y < y2+1; y++)1060 { 1061 for (x = x1 -1; x < x2+1; x++)1062 { 1063 if (!in_bounds_fully(y, x)) continue; 1064 1065 /* Redraw */ 1066 lite_spot(y, x); 1067 } 1068 } 1069 1060 /* Rescan the map for the new dtrap edge */ 1061 for (y = y1 - 1; y < y2 + 1; y++) 1062 { 1063 for (x = x1 - 1; x < x2 + 1; x++) 1064 { 1065 if (!in_bounds_fully(y, x)) continue; 1066 1067 /* Redraw */ 1068 lite_spot(y, x); 1069 } 1070 } 1071 1070 1072 1071 1073 /* Describe */ 1072 1074 if (detect) 1073 1075 msg_print("You sense the presence of traps!"); 1076 1077 /* Trap detection always makes you aware, even if no traps are present */ 1074 1078 else 1075 /* Trap detection always makes you aware, even if no traps are present */1076 1079 msg_print("You sense no traps."); 1077 1080 trunk/src/store.c
r918 r930 477 477 assert(max > 1); 478 478 479 for (i = 0; i < max; i++)479 for (i = 0; i < times; i++) 480 480 t += randint0(max); 481 481 trunk/src/wiz-stats.c
r918 r930 16 16 */ 17 17 #include "angband.h" 18 #include "cmds.h" 18 19 #include "wizard.h" 19 20 #include "tvalsval.h" trunk/src/xtra1.c
r918 r930 1696 1696 void redraw_stuff(void) 1697 1697 { 1698 int i;1699 1698 size_t i; 1699 1700 1700 /* Redraw stuff */ 1701 1701 if (!p_ptr->redraw) return; … … 1725 1725 p_ptr->redraw = 0; 1726 1726 1727 /* 1727 /* 1728 1728 * Do any plotting, etc. delayed from earlier - this set of updates 1729 * is over. 1729 * is over. 1730 1730 */ 1731 1731 event_signal(EVENT_END); … … 1734 1734 1735 1735 /* 1736 * Handle "p_ptr->update" and "p_ptr->redraw" 1736 * Handle "p_ptr->update" and "p_ptr->redraw" 1737 1737 */ 1738 1738 void handle_stuff(void) trunk/src/z-util.c
r918 r930 90 90 char *my_stristr(const char *string, const char *pattern) 91 91 { 92 char *pptr, *sptr, *start; 92 const char *pptr, *sptr; 93 char *start; 93 94 94 95 for (start = (char *)string; *start != 0; start++) … … 101 102 return NULL; 102 103 103 pptr = (c har *)pattern;104 sptr = (c har *)start;104 pptr = (const char *)pattern; 105 sptr = (const char *)start; 105 106 106 107 while (toupper((unsigned char)*sptr) == toupper((unsigned char)*pptr))
