… | |
… | |
1134 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1134 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1135 | &tmp->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1135 | &tmp->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1136 | else |
1136 | else |
1137 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1137 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1138 | &tmp->arch->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1138 | &tmp->arch->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
|
|
1139 | |
1139 | new_draw_info (NDI_UNIQUE, 0, op, putstring); |
1140 | new_draw_info (NDI_UNIQUE, 0, op, putstring); |
1140 | |
|
|
1141 | sprintf (putstring, "...flags: "); |
|
|
1142 | for (k = 0; k < 4; k++) |
|
|
1143 | { |
|
|
1144 | for (j = 0; j < 32; j++) |
|
|
1145 | { |
|
|
1146 | if ((tmp->flags[k] >> j) & 0x01) |
|
|
1147 | { |
|
|
1148 | sprintf (tmpstr, "%d ", k * 32 + j); |
|
|
1149 | strcat (putstring, tmpstr); |
|
|
1150 | } |
|
|
1151 | } |
|
|
1152 | } |
|
|
1153 | new_draw_info (NDI_UNIQUE, 0, op, putstring); |
|
|
1154 | |
|
|
1155 | #if 0 |
|
|
1156 | /* print the flags too */ |
|
|
1157 | for (k = 0; k < 4; k++) |
|
|
1158 | { |
|
|
1159 | fprintf (stderr, "%d [%d] ", k, k * 32 + 31); |
|
|
1160 | for (j = 0; j < 32; j++) |
|
|
1161 | { |
|
|
1162 | fprintf (stderr, "%d", tmp->flags[k] >> (31 - j) & 0x01); |
|
|
1163 | if (!((j + 1) % 4)) |
|
|
1164 | fprintf (stderr, " "); |
|
|
1165 | } |
|
|
1166 | fprintf (stderr, " [%d]\n", k * 32); |
|
|
1167 | } |
|
|
1168 | #endif |
|
|
1169 | } |
1141 | } |
|
|
1142 | |
1170 | /* philosophy: |
1143 | /* philosophy: |
1171 | * It's easy to grab an item type from a pile, as long as it's |
1144 | * It's easy to grab an item type from a pile, as long as it's |
1172 | * generic. This takes no game-time. For more detailed pickups |
1145 | * generic. This takes no game-time. For more detailed pickups |
1173 | * and selections, select-items shoul dbe used. This is a |
1146 | * and selections, select-items should be used. This is a |
1174 | * grab-as-you-run type mode that's really useful for arrows for |
1147 | * grab-as-you-run type mode that's really useful for arrows for |
1175 | * example. |
1148 | * example. |
1176 | * The drawback: right now it has no frontend, so you need to |
1149 | * The drawback: right now it has no frontend, so you need to |
1177 | * stick the bits you want into a calculator in hex mode and then |
1150 | * stick the bits you want into a calculator in hex mode and then |
1178 | * convert to decimal and then 'pickup <#> |
1151 | * convert to decimal and then 'pickup <#> |