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

Function DrawGoldSplit

Source/control.cpp:1871–1894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1869}
1870
1871void DrawGoldSplit(int amount)
1872{
1873 int screen_x, i;
1874
1875 screen_x = 0;
1876 CelDraw(351 + SCREEN_X, 178 + SCREEN_Y, pGBoxBuff, 1, 261);
1877 sprintf(tempstr, "You have %u gold", initialDropGoldValue);
1878 ADD_PlrStringXY(366, 87, 600, tempstr, COL_GOLD);
1879 sprintf(tempstr, "%s. How many do", get_pieces_str(initialDropGoldValue));
1880 ADD_PlrStringXY(366, 103, 600, tempstr, COL_GOLD);
1881 ADD_PlrStringXY(366, 121, 600, "you want to remove?", COL_GOLD);
1882 if (amount > 0) {
1883 sprintf(tempstr, "%u", amount);
1884 PrintGameStr(388, 140, tempstr, 0);
1885 for (i = 0; i < tempstr[i]; i++) {
1886 screen_x += fontkern[fontframe[gbFontTransTbl[(BYTE)tempstr[i]]]] + 1;
1887 }
1888 screen_x += 452;
1889 } else {
1890 screen_x = 450;
1891 }
1892 CelDraw(screen_x, 140 + SCREEN_Y, pSPentSpn2Cels, PentSpn2Frame, 12);
1893 PentSpn2Spin();
1894}
1895
1896void control_drop_gold(char vkey)
1897{

Callers 1

DrawViewFunction · 0.85

Calls 4

CelDrawFunction · 0.85
get_pieces_strFunction · 0.85
PrintGameStrFunction · 0.85
PentSpn2SpinFunction · 0.85

Tested by

no test coverage detected