Changeset 59
- Timestamp:
- 04/22/07 11:24:42 (2 years ago)
- Files:
-
- trunk/src/birth.c (modified) (2 diffs)
- trunk/src/cmd3.c (modified) (7 diffs)
- trunk/src/dungeon.c (modified) (4 diffs)
- trunk/src/load.c (modified) (1 diff)
- trunk/src/object1.c (modified) (2 diffs)
- trunk/src/object2.c (modified) (1 diff)
- trunk/src/store.c (modified) (5 diffs)
- trunk/src/ui.c (modified) (1 diff)
- trunk/src/ui.h (modified) (1 diff)
- trunk/src/xtra1.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/birth.c
r54 r59 589 589 object_prep(i_ptr, lookup_kind(TV_LITE, SV_LITE_TORCH)); 590 590 i_ptr->number = (byte)rand_range(3, 7); 591 i_ptr-> pval= rand_range(3, 7) * 500;591 i_ptr->timeout = rand_range(3, 7) * 500; 592 592 object_aware(i_ptr); 593 593 object_known(i_ptr); … … 829 829 } 830 830 831 else i++; 831 /* Selection! */ 832 else if(cx.key == '\r' || cx.key == '\n' || cx.key == '\xff') 833 i++; 832 834 } 833 835 trunk/src/cmd3.c
r48 r59 786 786 if ((o_ptr->tval == TV_LITE) && 787 787 (o_ptr->sval == SV_LITE_LANTERN) && 788 (o_ptr-> pval> 0))788 (o_ptr->timeout > 0)) 789 789 { 790 790 return (TRUE); … … 837 837 838 838 /* Refuel */ 839 j_ptr-> pval +=o_ptr->pval;839 j_ptr->timeout += o_ptr->timeout ? o_ptr->timeout : o_ptr->pval; 840 840 841 841 /* Message */ … … 843 843 844 844 /* Comment */ 845 if (j_ptr-> pval>= FUEL_LAMP)846 { 847 j_ptr-> pval= FUEL_LAMP;845 if (j_ptr->timeout >= FUEL_LAMP) 846 { 847 j_ptr->timeout = FUEL_LAMP; 848 848 msg_print("Your lamp is full."); 849 849 } 850 850 851 /* Refilled from a la tern */851 /* Refilled from a lantern */ 852 852 if (o_ptr->sval == SV_LITE_LANTERN) 853 853 { … … 868 868 869 869 /* Remove fuel */ 870 i_ptr-> pval= 0;870 i_ptr->timeout = 0; 871 871 872 872 /* Unstack the used item */ … … 881 881 } 882 882 883 /* Empty a single la tern */883 /* Empty a single lantern */ 884 884 else 885 885 { 886 886 /* No more fuel */ 887 o_ptr-> pval= 0;887 o_ptr->timeout = 0; 888 888 } 889 889 … … 979 979 980 980 /* Refuel */ 981 j_ptr-> pval += o_ptr->pval+ 5;981 j_ptr->timeout += o_ptr->timeout + 5; 982 982 983 983 /* Message */ … … 985 985 986 986 /* Over-fuel message */ 987 if (j_ptr-> pval>= FUEL_TORCH)988 { 989 j_ptr-> pval= FUEL_TORCH;987 if (j_ptr->timeout >= FUEL_TORCH) 988 { 989 j_ptr->timeout = FUEL_TORCH; 990 990 msg_print("Your torch is fully fueled."); 991 991 } trunk/src/dungeon.c
r50 r59 456 456 457 457 /* Recharge activatable objects */ 458 if (o_ptr->timeout > 0 )458 if (o_ptr->timeout > 0 && !(o_ptr->tval == TV_LITE && !artifact_p(o_ptr))) 459 459 { 460 460 /* Recharge */ … … 1026 1026 { 1027 1027 /* Hack -- Use some fuel (except on artifacts) */ 1028 if (!artifact_p(o_ptr) && (o_ptr-> pval> 0))1028 if (!artifact_p(o_ptr) && (o_ptr->timeout > 0)) 1029 1029 { 1030 1030 /* Decrease life-span */ 1031 o_ptr-> pval--;1031 o_ptr->timeout--; 1032 1032 1033 1033 /* Hack -- notice interesting fuel steps */ 1034 if ((o_ptr-> pval < 100) || (!(o_ptr->pval% 100)))1034 if ((o_ptr->timeout < 100) || (!(o_ptr->timeout % 100))) 1035 1035 { 1036 1036 /* Window stuff */ … … 1042 1042 { 1043 1043 /* Hack -- save some light for later */ 1044 if (o_ptr-> pval == 0) o_ptr->pval++;1044 if (o_ptr->timeout == 0) o_ptr->timeout++; 1045 1045 } 1046 1046 1047 1047 /* The light is now out */ 1048 else if (o_ptr-> pval== 0)1048 else if (o_ptr->timeout == 0) 1049 1049 { 1050 1050 disturb(0, 0); … … 1053 1053 1054 1054 /* The light is getting dim */ 1055 else if ((o_ptr-> pval < 100) && (!(o_ptr->pval% 10)))1055 else if ((o_ptr->timeout < 100) && (!(o_ptr->timeout % 10))) 1056 1056 { 1057 1057 if (disturb_minor) disturb(0, 0); trunk/src/load.c
r52 r59 478 478 } 479 479 } 480 481 if(older_than(3, 0, 9) && o_ptr->tval == TV_LITE && !artifact_p(o_ptr) && !ego_item_p(o_ptr) && o_ptr->pval) 482 { 483 o_ptr->timeout = o_ptr->pval; 484 o_ptr->pval = 0; 485 } 486 480 487 481 488 /* Success */ trunk/src/object1.c
r48 r59 1318 1318 /* Hack -- Turns of light for normal lites */ 1319 1319 object_desc_str_macro(t, " (with "); 1320 object_desc_num_macro(t, o_ptr-> pval);1320 object_desc_num_macro(t, o_ptr->timeout); 1321 1321 object_desc_str_macro(t, " turns of light)"); 1322 1322 } … … 1467 1467 1468 1468 /* Indicate "charging" artifacts */ 1469 else if (known && o_ptr->timeout )1469 else if (known && o_ptr->timeout && !(o_ptr->tval == TV_LITE && !artifact_p(o_ptr))) 1470 1470 { 1471 1471 /* Hack -- Dump " (charging)" if relevant */ trunk/src/object2.c
r48 r59 2450 2450 case TV_LITE: 2451 2451 { 2452 /* Hack -- Torches -- random fuel*/2452 /* Hack -- Torches & lanterns -- random fuel at 1/2 max */ 2453 2453 if (o_ptr->sval == SV_LITE_TORCH) 2454 2454 { 2455 if (o_ptr->pval > 0) o_ptr->pval = randint(o_ptr->pval);2455 o_ptr->timeout = randint(FUEL_TORCH/2); 2456 2456 } 2457 2457 2458 /* Hack -- Lanterns -- random fuel */2459 2458 else if (o_ptr->sval == SV_LITE_LANTERN) 2460 2459 { 2461 if (o_ptr->pval > 0) o_ptr->pval = randint(o_ptr->pval);2460 o_ptr->timeout = randint(FUEL_LAMP/2); 2462 2461 } 2463 2462 trunk/src/store.c
r57 r59 1169 1169 if (object.tval == TV_LITE) 1170 1170 { 1171 if (object.sval == SV_LITE_TORCH) object. pval= FUEL_TORCH / 2;1172 else if (object.sval == SV_LITE_LANTERN) object. pval= FUEL_LAMP / 2;1171 if (object.sval == SV_LITE_TORCH) object.timeout = FUEL_TORCH / 2; 1172 else if (object.sval == SV_LITE_LANTERN) object.timeout = FUEL_LAMP / 2; 1173 1173 } 1174 1174 … … 1302 1302 if (i_ptr->tval == TV_LITE) 1303 1303 { 1304 if (i_ptr->sval == SV_LITE_TORCH) i_ptr-> pval= FUEL_TORCH / 2;1305 if (i_ptr->sval == SV_LITE_LANTERN) i_ptr-> pval= FUEL_LAMP / 2;1304 if (i_ptr->sval == SV_LITE_TORCH) i_ptr->timeout = FUEL_TORCH / 2; 1305 if (i_ptr->sval == SV_LITE_LANTERN) i_ptr->timeout = FUEL_LAMP / 2; 1306 1306 } 1307 1307 … … 2633 2633 { 2634 2634 store_sell(oid); 2635 2636 2635 break; 2637 2636 } … … 2873 2872 2874 2873 /* These two can't intersect! */ 2875 menu.cmd_keys = "\n\ r\t?=CeEiIls";2874 menu.cmd_keys = "\n\p\r\t?=CdeEiIls"; 2876 2875 menu.selections = "abcfghjkmnopqrtuvxyz"; 2877 2876 } … … 2882 2881 2883 2882 /* These two can't intersect! */ 2884 menu.cmd_keys = "\t\n\ r{}Idepw";2885 menu.selections = "abcf ghijklmnoqrstuvxyz1234567890";2883 menu.cmd_keys = "\t\n\p\r{}gIepw"; 2884 menu.selections = "abcfhijklmnoqrstuvxyz1234567890"; 2886 2885 } 2887 2886 if(cursor >= menu.count) cursor = menu.count -1; trunk/src/ui.c
r33 r59 42 42 43 43 const char lower_case[] = "abcdefghijklmnopqrstuvwxyz"; 44 const char upper_case[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 44 45 45 46 int jumpscroll = 0; trunk/src/ui.h
r33 r59 30 30 extern const char default_choice[]; /* 1234567890A-Za-z */ 31 31 extern const char lower_case[]; /* abc..z */ 32 extern const char upper_case[]; /* ABC..Z */ 32 33 33 34 trunk/src/xtra1.c
r48 r59 1793 1793 1794 1794 /* Lanterns (with fuel) provide more lite */ 1795 if ((o_ptr->sval == SV_LITE_LANTERN) && (o_ptr-> pval> 0))1795 if ((o_ptr->sval == SV_LITE_LANTERN) && (o_ptr->timeout > 0)) 1796 1796 { 1797 1797 p_ptr->cur_lite += 2; … … 1800 1800 1801 1801 /* Torches (with fuel) provide some lite */ 1802 if ((o_ptr->sval == SV_LITE_TORCH) && (o_ptr-> pval> 0))1802 if ((o_ptr->sval == SV_LITE_TORCH) && (o_ptr->timeout > 0)) 1803 1803 { 1804 1804 p_ptr->cur_lite += 1;
