| 1288 | /************************* ask_name *******************************/ |
| 1289 | |
| 1290 | char * |
| 1291 | mar_ask_name() |
| 1292 | { |
| 1293 | OBJECT *z_ob = zz_oblist[NAMEGET]; |
| 1294 | int bild_fehler; |
| 1295 | char who_are_you[] = "Who are you? "; |
| 1296 | |
| 1297 | bild_fehler = |
| 1298 | depack_img(planes < 4 ? "TITLE2.IMG" : "TITLE.IMG", &titel_image); |
| 1299 | if (bild_fehler) { /* MAR -- this isn't lethal */ |
| 1300 | ob_set_text(z_ob, NETHACKPICTURE, "missing title.img."); |
| 1301 | } else { |
| 1302 | mfdb(&Titel_bild, (int *) titel_image.addr, titel_image.img_w, |
| 1303 | titel_image.img_h, 1, titel_image.planes); |
| 1304 | transform_img(&Titel_bild); |
| 1305 | z_ob[NETHACKPICTURE].ob_type = G_USERDEF; |
| 1306 | z_ob[NETHACKPICTURE].ob_spec.userblk = &ub_titel; |
| 1307 | } |
| 1308 | |
| 1309 | ob_clear_edit(z_ob); |
| 1310 | xdialog(z_ob, who_are_you, NULL, NULL, DIA_CENTERED, FALSE, DIALOG_MODE); |
| 1311 | Event_Timer(0, 0, TRUE); |
| 1312 | |
| 1313 | test_free(titel_image.palette); |
| 1314 | test_free(titel_image.addr); |
| 1315 | test_free(Titel_bild.fd_addr); |
| 1316 | return (ob_get_text(z_ob, PLNAME, 0)); |
| 1317 | } |
| 1318 | |
| 1319 | /************************* more *******************************/ |
| 1320 |
no test coverage detected