Changeset 35
- Timestamp:
- 04/09/07 10:01:21 (2 years ago)
- Files:
-
- trunk/src/cmd4.c (modified) (12 diffs)
- trunk/src/z-term.c (modified) (1 diff)
- trunk/src/z-term.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd4.c
r33 r35 193 193 { 194 194 feature_type *f_ptr = &f_info[feat]; 195 switch(f_ptr->d_char) { 195 switch(f_ptr->d_char) 196 { 196 197 case '.': return 0; 197 198 case '^': return 1; … … 201 202 case '*': case '%' : return 5; 202 203 case ';': case ':' : return 6; 204 203 205 default: 204 if(isdigit(f_ptr->d_char)) return 7;205 return 8;206 } 207 } ;206 if (isdigit(f_ptr->d_char)) return 7; 207 return 8; 208 } 209 } 208 210 209 211 … … 227 229 return width; 228 230 } 231 229 232 static int actual_height(int height) { 230 233 if(use_bigtile) height *= 2; … … 364 367 int g_o_count = 0; /* object count for group */ 365 368 int oid = -1; /* object identifiers */ 369 370 region title_area = {0, 0, 0, 4}; 371 region group_region = {0, 6, g_name_len, -2}; 372 region object_region = {g_name_len+3, 6, 0, -2}; 366 373 367 374 /* display state variables */ … … 394 401 int i; 395 402 int prev_g = -1; 403 404 int omode = rogue_like_commands; 396 405 397 406 /* Get size */ … … 430 439 431 440 /* Disable the roguelike commands for the duration */ 432 int omode = rogue_like_commands;433 441 rogue_like_commands = FALSE; 434 435 region title_area = {0, 0, 0, 4};436 region group_region = {0, 6, g_name_len, -2};437 region object_region = {g_name_len+3, 6, 0, -2};438 442 439 443 /* Leave room for the group summary information */ … … 3939 3943 char tmp_val[256]; 3940 3944 3941 typedef void (*dump_func)(FILE *);3945 typedef void (*dump_func)(FILE *); 3942 3946 dump_func dump_visuals [] = 3943 { dump_monsters, dump_features, dump_objects, dump_flavors, dump_colors};3947 { dump_monsters, dump_features, dump_objects, dump_flavors, dump_colors }; 3944 3948 3945 3949 /* File type is "TEXT" */ 3946 3950 FILE_TYPE(FILE_TYPE_TEXT); 3947 3948 3951 3949 3952 /* Ask for a file */ … … 3955 3958 fff = my_fopen(file_name, "w"); 3956 3959 3957 if (!fff) { 3960 /* Check for failure */ 3961 if (!fff) 3962 { 3958 3963 msg_print("Screen dump failed."); 3959 3964 message_flush(); 3960 3965 return; 3961 3966 } 3962 for(i = 0; i < N_ELEMENTS(dump_visuals); i++) 3967 3968 /* Dump all the visuals */ 3969 for (i = 0; i < N_ELEMENTS(dump_visuals); i++) 3963 3970 dump_visuals[i](fff); 3971 3964 3972 my_fclose(fff); 3965 3966 3973 3967 3974 /* Dump the screen with raw character attributes */ … … 3976 3983 do_cmd_redraw(); 3977 3984 3978 msg_print("H tmlscreen dump saved.");3985 msg_print("HTML screen dump saved."); 3979 3986 message_flush(); 3980 3987 } … … 4029 4036 { 4030 4037 int cursor = -1; 4038 event_type c; 4031 4039 4032 4040 screen_save(); 4033 4034 4041 menu_layout(&option_menu, &SCREEN_REGION); 4035 for(;;) { 4036 event_type c; 4042 4043 while (c.key != ESCAPE) 4044 { 4037 4045 Term_clear(); 4038 4046 c = menu_select(&option_menu, &cursor, 0); 4039 if(ESCAPE == c.key) break;4040 4047 } 4041 4048 … … 4046 4053 { 4047 4054 int cursor = -1; 4055 event_type c; 4048 4056 4049 4057 screen_save(); 4050 4051 4058 menu_layout(&knowledge_menu, &SCREEN_REGION); 4052 for(;;) { 4053 event_type c; 4059 4060 while (c.key != ESCAPE) 4061 { 4054 4062 Term_clear(); 4055 4063 c = menu_select(&knowledge_menu, &cursor, 0); 4056 if(ESCAPE == c.key) break;4057 4064 } 4058 4065 … … 4115 4122 4116 4123 /* initialize other static variables */ 4117 if(!obj_group_order) { 4124 if (!obj_group_order) 4125 { 4118 4126 int i; 4119 4127 int gid = -1; 4128 4120 4129 C_MAKE(obj_group_order, TV_GOLD+1, int); 4121 4130 atexit(cleanup_cmds); 4122 for(i = 0; i <= TV_GOLD; i++) /* allow for missing values */ 4131 4132 /* Sllow for missing values */ 4133 for (i = 0; i <= TV_GOLD; i++) 4123 4134 obj_group_order[i] = -1; 4124 for(i = 0; 0 != object_text_order[i].tval; i++) { 4135 4136 for (i = 0; 0 != object_text_order[i].tval; i++) 4137 { 4125 4138 if(object_text_order[i].name) gid = i; 4126 4139 obj_group_order[object_text_order[i].tval] = gid; trunk/src/z-term.c
r33 r35 1928 1928 errr Term_key_push(int k) 1929 1929 { 1930 event_type ke; 1931 1930 1932 if (!k) return (-1); 1931 event_type ke; 1933 1932 1934 ke.type = EVT_KBRD; 1933 1935 ke.index = 0; 1934 1936 ke.key = k; 1937 1935 1938 return Term_event_push(&ke); 1936 1939 } trunk/src/z-term.h
r33 r35 78 78 /* For example, a command key action. */ 79 79 EVT_REFRESH = 0x0200, /* Display refresh */ 80 EVT_RESIZE = 0x0400, /* Display re fresh*/81 82 EVT_AGAIN = 0x4000000 0, /* Retry notification */83 EVT_STOP = 0x8000000 0,/* Loop stopped (never handled) */80 EVT_RESIZE = 0x0400, /* Display resize */ 81 82 EVT_AGAIN = 0x4000000, /* Retry notification */ 83 EVT_STOP = 0x8000000 /* Loop stopped (never handled) */ 84 84 } event_class; 85 85
