MCPcopy Create free account
hub / github.com/diasurgical/devilution / ReleaseChrBtns

Function ReleaseChrBtns

Source/control.cpp:1598–1631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1596}
1597
1598void ReleaseChrBtns()
1599{
1600 int i;
1601
1602 chrbtnactive = FALSE;
1603 for (i = 0; i < 4; ++i) {
1604 if (chrbtn[i]) {
1605 chrbtn[i] = 0;
1606 if (MouseX >= ChrBtnsRect[i].x
1607 && MouseX <= ChrBtnsRect[i].x + ChrBtnsRect[i].w
1608 && MouseY >= ChrBtnsRect[i].y
1609 && MouseY <= ChrBtnsRect[i].y + ChrBtnsRect[i].h) {
1610 switch (i) {
1611 case 0:
1612 NetSendCmdParam1(TRUE, CMD_ADDSTR, 1);
1613 plr[myplr]._pStatPts--;
1614 break;
1615 case 1:
1616 NetSendCmdParam1(TRUE, CMD_ADDMAG, 1);
1617 plr[myplr]._pStatPts--;
1618 break;
1619 case 2:
1620 NetSendCmdParam1(TRUE, CMD_ADDDEX, 1);
1621 plr[myplr]._pStatPts--;
1622 break;
1623 case 3:
1624 NetSendCmdParam1(TRUE, CMD_ADDVIT, 1);
1625 plr[myplr]._pStatPts--;
1626 break;
1627 }
1628 }
1629 }
1630 }
1631}
1632
1633void DrawDurIcon()
1634{

Callers 2

PerformPrimaryActionFunction · 0.85
LeftMouseUpFunction · 0.85

Calls 1

NetSendCmdParam1Function · 0.85

Tested by

no test coverage detected