add Qt paperdoll 'todo' comment
Add a comment to qt_inv.cpp, plus a couple of reformatting bits in cmd.c and invent.c.
This commit is contained in:
@@ -4600,7 +4600,8 @@ reset_commands(boolean initial)
|
|||||||
#endif
|
#endif
|
||||||
/* FIXME: NHKF_DOINV2 ought to be implemented instead of this */
|
/* FIXME: NHKF_DOINV2 ought to be implemented instead of this */
|
||||||
c = M('0') & 0xff;
|
c = M('0') & 0xff;
|
||||||
gc.Cmd.commands[c] = gc.Cmd.pcHack_compat ? gc.Cmd.commands['I'] : 0;
|
gc.Cmd.commands[c] = gc.Cmd.pcHack_compat ? gc.Cmd.commands['I']
|
||||||
|
: 0;
|
||||||
}
|
}
|
||||||
/* phone keypad layout (only applicable for num_pad) */
|
/* phone keypad layout (only applicable for num_pad) */
|
||||||
flagtemp = (iflags.num_pad_mode & 2) ? gc.Cmd.num_pad : FALSE;
|
flagtemp = (iflags.num_pad_mode & 2) ? gc.Cmd.num_pad : FALSE;
|
||||||
|
|||||||
23
src/invent.c
23
src/invent.c
@@ -1016,8 +1016,11 @@ DISABLE_WARNING_FORMAT_NONLITERAL
|
|||||||
* touch_artifact will print its own messages if they are warranted.
|
* touch_artifact will print its own messages if they are warranted.
|
||||||
*/
|
*/
|
||||||
struct obj *
|
struct obj *
|
||||||
hold_another_object(struct obj *obj, const char *drop_fmt,
|
hold_another_object(
|
||||||
const char *drop_arg, const char *hold_msg)
|
struct obj *obj, /* object to be held */
|
||||||
|
const char *drop_fmt, /* format string for message if it can't be held */
|
||||||
|
const char *drop_arg, /* argument to use when formatting message */
|
||||||
|
const char *hold_msg) /* message to display if successfully held */
|
||||||
{
|
{
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
|
|
||||||
@@ -2636,12 +2639,18 @@ enum item_action_actions {
|
|||||||
|
|
||||||
/* construct text for the menu entries for IA_NAME_OBJ and IA_NAME_OTYP */
|
/* construct text for the menu entries for IA_NAME_OBJ and IA_NAME_OTYP */
|
||||||
static boolean
|
static boolean
|
||||||
item_naming_classification(struct obj *obj, char *onamebuf, char *ocallbuf)
|
item_naming_classification(
|
||||||
|
struct obj *obj,
|
||||||
|
char *onamebuf,
|
||||||
|
char *ocallbuf)
|
||||||
{
|
{
|
||||||
static const char Name[] = "Name", Rename[] = "Rename or un-name",
|
static const char
|
||||||
/* "re-call" seems a bit weird, but "recall" and
|
Name[] = "Name",
|
||||||
"rename" don't fit for changing a type name */
|
Rename[] = "Rename or un-name",
|
||||||
Call[] = "Call", Recall[] = "Re-call or un-call";
|
Call[] = "Call",
|
||||||
|
/* "re-call" seems a bit weird, but "recall" and
|
||||||
|
"rename" don't fit for changing a type name */
|
||||||
|
Recall[] = "Re-call or un-call";
|
||||||
|
|
||||||
onamebuf[0] = ocallbuf[0] = '\0';
|
onamebuf[0] = ocallbuf[0] = '\0';
|
||||||
if (name_ok(obj) == GETOBJ_SUGGEST) {
|
if (name_ok(obj) == GETOBJ_SUGGEST) {
|
||||||
|
|||||||
@@ -49,13 +49,19 @@ find_tool(int tooltyp)
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetHackQtInvUsageWindow::NetHackQtInvUsageWindow(QWidget* parent) :
|
NetHackQtInvUsageWindow::NetHackQtInvUsageWindow(QWidget *parent) :
|
||||||
QWidget(parent)
|
QWidget(parent)
|
||||||
{
|
{
|
||||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
// needed to enable tool tips
|
// needed to enable tool tips
|
||||||
setMouseTracking(true);
|
setMouseTracking(true);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO:
|
||||||
|
* Add support for clicking on a paperdoll cell and have that
|
||||||
|
* run itemactions(invent.c) for the object shown in the cell.
|
||||||
|
*/
|
||||||
|
|
||||||
// paperdoll is 6x3 but the indices are column oriented: 0..2x0..5
|
// paperdoll is 6x3 but the indices are column oriented: 0..2x0..5
|
||||||
for (int x = 0; x <= 2; ++x)
|
for (int x = 0; x <= 2; ++x)
|
||||||
for (int y = 0; y <= 5; ++y)
|
for (int y = 0; y <= 5; ++y)
|
||||||
@@ -70,9 +76,12 @@ NetHackQtInvUsageWindow::~NetHackQtInvUsageWindow()
|
|||||||
free((void *) tips[x][y]), tips[x][y] = NULL;
|
free((void *) tips[x][y]), tips[x][y] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetHackQtInvUsageWindow::drawWorn(QPainter &painter, obj *nhobj,
|
void NetHackQtInvUsageWindow::drawWorn(
|
||||||
int x, int y, // cell index, not pixels
|
QPainter &painter,
|
||||||
const char *alttip, int flags)
|
obj *nhobj,
|
||||||
|
int x, int y, // cell index, not pixels
|
||||||
|
const char *alttip,
|
||||||
|
int flags)
|
||||||
{
|
{
|
||||||
short int glyph;
|
short int glyph;
|
||||||
glyph_info gi;
|
glyph_info gi;
|
||||||
|
|||||||
Reference in New Issue
Block a user