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

Function DrawTalkPan

Source/control.cpp:1972–2032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1970}
1971
1972void DrawTalkPan()
1973{
1974 int i, off, talk_btn, color, nCel, x;
1975 char *msg;
1976
1977 if (!talkflag)
1978 return;
1979
1980 DrawPanelBox(175, sgbPlrTalkTbl + 20, 294, 5, PANEL_X + 175, PANEL_Y + 4);
1981 off = 0;
1982 for (i = 293; i > 283; off++, i--) {
1983 DrawPanelBox((off >> 1) + 175, sgbPlrTalkTbl + off + 25, i, 1, (off >> 1) + PANEL_X + 175, off + PANEL_Y + 9);
1984 }
1985 DrawPanelBox(185, sgbPlrTalkTbl + 35, 274, 30, PANEL_X + 185, PANEL_Y + 19);
1986 DrawPanelBox(180, sgbPlrTalkTbl + 65, 284, 5, PANEL_X + 180, PANEL_Y + 49);
1987 for (i = 0; i < 10; i++) {
1988 DrawPanelBox(180, sgbPlrTalkTbl + i + 70, i + 284, 1, PANEL_X + 180, i + PANEL_Y + 54);
1989 }
1990 DrawPanelBox(170, sgbPlrTalkTbl + 80, 310, 55, PANEL_X + 170, PANEL_Y + 64);
1991 msg = sgszTalkMsg;
1992 for (i = 0; i < 39; i += 13) {
1993 x = 0 + PANEL_LEFT;
1994 msg = control_print_talk_msg(msg, &x, i, 0);
1995 if (!msg)
1996 break;
1997 }
1998 if (msg)
1999 *msg = '\0';
2000 CelDraw(x, i + 22 + PANEL_Y, pSPentSpn2Cels, PentSpn2Frame, 12);
2001 PentSpn2Spin();
2002 talk_btn = 0;
2003 for (i = 0; i < 4; i++) {
2004 if (i == myplr)
2005 continue;
2006 if (whisper[i]) {
2007 color = COL_GOLD;
2008 if (talkbtndown[talk_btn]) {
2009 if (talk_btn != 0)
2010 nCel = 4;
2011 else
2012 nCel = 3;
2013 CelDraw(172 + PANEL_X, 84 + 18 * talk_btn + PANEL_Y, pTalkBtns, nCel, 61);
2014 }
2015 } else {
2016 color = COL_RED;
2017 if (talk_btn != 0)
2018 nCel = 2;
2019 else
2020 nCel = 1;
2021 if (talkbtndown[talk_btn])
2022 nCel += 4;
2023 CelDraw(172 + PANEL_X, 84 + 18 * talk_btn + PANEL_Y, pTalkBtns, nCel, 61);
2024 }
2025 if (plr[i].plractive) {
2026 x = 46 + PANEL_LEFT;
2027 control_print_talk_msg(plr[i]._pName, &x, 60 + talk_btn * 18, color);
2028 }
2029

Callers 1

DrawAndBlitFunction · 0.85

Calls 4

DrawPanelBoxFunction · 0.85
control_print_talk_msgFunction · 0.85
CelDrawFunction · 0.85
PentSpn2SpinFunction · 0.85

Tested by

no test coverage detected