Exemplo n.º 1
0
static void spoiler_menu_act(const char *title, int row)
{
	if (row == 0)
		spoil_obj_desc("obj-desc.spo");
	else if (row == 1)
		spoil_artifact("artifact.spo");
	else if (row == 2)
		spoil_mon_desc("mon-desc.spo");
	else if (row == 3)
		spoil_mon_info("mon-info.spo");

	message_flush();
}
Exemplo n.º 2
0
static void spoiler_menu_act(const char *title, int row)
{
	if (row == 0)
		spoil_obj_desc("obj-desc.spo");
	else if (row == 1)
		spoil_artifact("artifact.spo");
	else if (row == 2)
		spoil_mon_desc("mon-desc.spo");
	else if (row == 3)
		spoil_mon_info("mon-info.spo");

	event_signal(EVENT_MESSAGE_FLUSH);
}
Exemplo n.º 3
0
/*
 * Create Spoiler files
 */
void do_cmd_spoilers(void)
{
	int ch;


	/* Save screen */
	screen_save(TRUE);


	/* Drop priv's */
	safe_setuid_drop();


	/* Interact */
	while (TRUE)
	{
		/* Clear screen */
		(void)Term_clear();

		/* Info */
		prt(format("Create a spoiler file (appears in the .%s%s%s%s' directory).",
			PATH_SEP, "lib", PATH_SEP, "info"), 2, 0);

		/* Prompt for a file */
		prt("(1) Brief Object Info   (obj-desc.spo)", 5, 5);
		prt("(2) Brief Artifact Info (artifact.spo)", 6, 5);
		prt("(3) Brief Monster Info  (mon-desc.spo)", 7, 5);
		prt("(4) Full Monster Info   (mon-info.spo)", 8, 5);

		prt("(5) See what objects appear on this level  (obj-gen.spo)", 10, 5);
		prt("(6) See what monsters appear on this level (mon-gen.spo)", 11, 5);

		/* Prompt */
		prt("Command:", 12, 0);

		/* Get a choice */
		ch = inkey(FALSE);

		/* Escape */
		if (ch == ESCAPE)
		{
			break;
		}

		/* Option (1) */
		else if (ch == '1')
		{
			spoil_obj_desc("obj-desc.spo");
		}

		/* Option (2) */
		else if (ch == '2')
		{
			spoil_artifact("artifact.spo");
		}

		/* Option (3) */
		else if (ch == '3')
		{
			spoil_mon_desc("mon-desc.spo");
		}

		/* Option (4) */
		else if (ch == '4')
		{
			spoil_mon_info("mon-info.spo");
		}

		/* Option (5) */
		else if (ch == '5')
		{
			spoil_obj_gen("obj-gen.spo");
		}

		/* Option (6) */
		else if (ch == '6')
		{
			spoil_mon_gen("mon-gen.spo");
		}

		/* Oops */
		else
		{
			bell("Illegal command for spoilers!");
		}

		/* Flush messages */
		msg_print(NULL);
	}


	/* Grab priv's */
	safe_setuid_grab();


	/* Load screen */
	screen_load();
}
Exemplo n.º 4
0
/*
 * Create Spoiler files -BEN-
 * Converted from File Creation to Document Creation, with online
 * viewing (as well as the option for HTML output).  -CHRIS-
 */
void do_cmd_spoilers(void)
{
    int i, row, col;

    screen_save();

    while (1)
    {
        Term_clear();

        prt("View Spoilers", 2, 0);

        /* Give some choices */
        row = 4;
        col = 2;
        c_prt(TERM_RED, "Object Spoilers", row++, col - 2);
        prt("(a) Artifact Descriptions", row++, col);
        prt("(A) Artifact Tables", row++, col);
        prt("(o) Objects", row++, col);
        prt("(O) Object Tables", row++, col);
        row++;

        c_prt(TERM_RED, "Monster Spoilers", row++, col - 2);
        prt("(m) Brief Descriptions", row++, col);
        prt("(M) Full Descriptions", row++, col);
        prt("(e) Evolution", row++, col);
        row++;

        c_prt(TERM_RED, "Class Spoilers", row++, col - 2);
        prt("(s) Spells by Class", row++, col);
        prt("(r) Spells by Realm", row++, col);
        row++;

        /* Prompt */
        prt("ESC) Exit menu", 21, 1);
        prt("Command: ", 20, 0);

        /* Prompt */
        i = inkey();

        /* Done */
        if (i == ESCAPE) break;
        switch (i)
        {
        /* Object Spoilers */
        case 'a':
            spoil_artifact_desc();
            break;
        case 'A':
            spoil_artifact_tables();
            break;
        case 'O':
            spoil_object_tables();
            break;
        case 'o':
            spoil_obj_desc("obj-desc.spo");
            break;

        /* Monster Spoilers */
        case 'm':
            spoil_mon_desc("mon-desc.spo");
            break;
        case 'M':
            spoil_mon_info();
            break;
        case 'e':
            spoil_mon_evol("mon-evol.spo");
            break;

        /* Class Spoilers */
        case 's':
            spoil_spells_by_class();
            break;
        case 'r':
            spoil_spells_by_realm();
            break;

        /* Oops */
        default:
            bell();
            break;
        }

        /* Flush messages */
        msg_print(NULL);
    }
    screen_load();
}