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

Function S_StartConfirm

Source/stores.cpp:1027–1091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1025}
1026
1027void S_StartConfirm()
1028{
1029 BOOL idprint;
1030 char iclr;
1031
1032 StartStore(stextshold);
1033 stextscrl = FALSE;
1034 ClearSText(5, 23);
1035 iclr = COL_WHITE;
1036
1037 if (plr[myplr].HoldItem._iMagical != ITEM_QUALITY_NORMAL)
1038 iclr = COL_BLUE;
1039 if (!plr[myplr].HoldItem._iStatFlag)
1040 iclr = COL_RED;
1041
1042 idprint = plr[myplr].HoldItem._iMagical != ITEM_QUALITY_NORMAL;
1043
1044 if (stextshold == STORE_SIDENTIFY)
1045 idprint = FALSE;
1046 if (plr[myplr].HoldItem._iMagical != ITEM_QUALITY_NORMAL && !plr[myplr].HoldItem._iIdentified) {
1047 if (stextshold == STORE_SSELL)
1048 idprint = FALSE;
1049 if (stextshold == STORE_WSELL)
1050 idprint = FALSE;
1051 if (stextshold == STORE_SREPAIR)
1052 idprint = FALSE;
1053 if (stextshold == STORE_WRECHARGE)
1054 idprint = FALSE;
1055 }
1056 if (idprint)
1057 AddSText(20, 8, 0, plr[myplr].HoldItem._iIName, iclr, 0);
1058 else
1059 AddSText(20, 8, 0, plr[myplr].HoldItem._iName, iclr, 0);
1060
1061 AddSTextVal(8, plr[myplr].HoldItem._iIvalue);
1062 PrintStoreItem(&plr[myplr].HoldItem, 9, iclr);
1063
1064 switch (stextshold) {
1065 case STORE_BBOY:
1066 strcpy(tempstr, "Do we have a deal?");
1067 break;
1068 case STORE_SIDENTIFY:
1069 strcpy(tempstr, "Are you sure you want to identify this item?");
1070 break;
1071 case STORE_HBUY:
1072 case STORE_SPBUY:
1073 case STORE_WBUY:
1074 case STORE_SBUY:
1075 strcpy(tempstr, "Are you sure you want to buy this item?");
1076 break;
1077 case STORE_WRECHARGE:
1078 strcpy(tempstr, "Are you sure you want to recharge this item?");
1079 break;
1080 case STORE_SSELL:
1081 case STORE_WSELL:
1082 strcpy(tempstr, "Are you sure you want to sell this item?");
1083 break;
1084 case STORE_SREPAIR:

Callers 1

StartStoreFunction · 0.85

Calls 5

StartStoreFunction · 0.85
ClearSTextFunction · 0.85
AddSTextFunction · 0.85
AddSTextValFunction · 0.85
PrintStoreItemFunction · 0.85

Tested by

no test coverage detected