void cScreenTown::check_studio(int StudioNum) { // player clicked on one of the brothels if (g_Studios.GetNumBrothels() == StudioNum) { // player doesn't own this Studio... can he buy it? static_brothel_data *bck = studio_data + StudioNum; locale syslocale(""); stringstream ss; ss.imbue(syslocale); if (!g_Gold.afford(bck->price) || g_Gangs.GetNumBusinessExtorted() < bck->business) { // can't buy it ss << gettext("This building costs ") << bck->price << gettext(" gold and you need to control at least ") << bck->business << gettext(" businesses."); if (!g_Gold.afford(bck->price)) ss << "\n" << gettext("You need ") << (bck->price - g_Gold.ival()) << gettext(" more gold to afford it."); if (g_Gangs.GetNumBusinessExtorted() < bck->business) ss << "\n" << gettext("You need to control ") << (bck->business - g_Gangs.GetNumBusinessExtorted()) << gettext(" more businesses."); g_MessageQue.AddToQue(ss.str(), 0); } else { // can buy it ss << gettext("Do you wish to purchase this building for ") << bck->price << gettext(" gold? It has ") << bck->rooms << gettext(" rooms."); g_MessageQue.AddToQue(ss.str(), 2); g_ChoiceManager.CreateChoiceBox(224, 112, 352, 384, 0, 2, 32, 8); g_ChoiceManager.AddChoice(0, gettext("Buy It"), 0); g_ChoiceManager.AddChoice(0, gettext("Don't Buy It"), 1); g_ChoiceManager.SetActive(0); BuyStudio = StudioNum; } } else { // player owns this brothel... go to it g_Building = BUILDING_STUDIO; g_CurrStudio = StudioNum; g_WinManager.push("Movie Screen"); } }