mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
(svn r21309) -Fix: second parameter of SetupSubsidyDecodeParam() is a bool, so use a bool when calling the function
This commit is contained in:
parent
bb02e30a37
commit
4231154bb4
@ -45,7 +45,7 @@ void Subsidy::AwardTo(CompanyID company)
|
|||||||
GetString(company_name, STR_COMPANY_NAME, company_name + MAX_LENGTH_COMPANY_NAME_BYTES - 1);
|
GetString(company_name, STR_COMPANY_NAME, company_name + MAX_LENGTH_COMPANY_NAME_BYTES - 1);
|
||||||
|
|
||||||
/* Add a news item */
|
/* Add a news item */
|
||||||
Pair reftype = SetupSubsidyDecodeParam(this, 0);
|
Pair reftype = SetupSubsidyDecodeParam(this, false);
|
||||||
InjectDParam(1);
|
InjectDParam(1);
|
||||||
|
|
||||||
SetDParamStr(0, company_name);
|
SetDParamStr(0, company_name);
|
||||||
@ -278,12 +278,12 @@ void SubsidyMonthlyLoop()
|
|||||||
FOR_ALL_SUBSIDIES(s) {
|
FOR_ALL_SUBSIDIES(s) {
|
||||||
if (--s->remaining == 0) {
|
if (--s->remaining == 0) {
|
||||||
if (!s->IsAwarded()) {
|
if (!s->IsAwarded()) {
|
||||||
Pair reftype = SetupSubsidyDecodeParam(s, 1);
|
Pair reftype = SetupSubsidyDecodeParam(s, true);
|
||||||
AddNewsItem(STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED, NS_SUBSIDIES, (NewsReferenceType)reftype.a, s->src, (NewsReferenceType)reftype.b, s->dst);
|
AddNewsItem(STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED, NS_SUBSIDIES, (NewsReferenceType)reftype.a, s->src, (NewsReferenceType)reftype.b, s->dst);
|
||||||
AI::BroadcastNewEvent(new AIEventSubsidyOfferExpired(s->index));
|
AI::BroadcastNewEvent(new AIEventSubsidyOfferExpired(s->index));
|
||||||
} else {
|
} else {
|
||||||
if (s->awarded == _local_company) {
|
if (s->awarded == _local_company) {
|
||||||
Pair reftype = SetupSubsidyDecodeParam(s, 1);
|
Pair reftype = SetupSubsidyDecodeParam(s, true);
|
||||||
AddNewsItem(STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE, NS_SUBSIDIES, (NewsReferenceType)reftype.a, s->src, (NewsReferenceType)reftype.b, s->dst);
|
AddNewsItem(STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE, NS_SUBSIDIES, (NewsReferenceType)reftype.a, s->src, (NewsReferenceType)reftype.b, s->dst);
|
||||||
}
|
}
|
||||||
AI::BroadcastNewEvent(new AIEventSubsidyExpired(s->index));
|
AI::BroadcastNewEvent(new AIEventSubsidyExpired(s->index));
|
||||||
@ -304,7 +304,7 @@ void SubsidyMonthlyLoop()
|
|||||||
if (s != NULL) {
|
if (s != NULL) {
|
||||||
s->remaining = SUBSIDY_OFFER_MONTHS;
|
s->remaining = SUBSIDY_OFFER_MONTHS;
|
||||||
s->awarded = INVALID_COMPANY;
|
s->awarded = INVALID_COMPANY;
|
||||||
Pair reftype = SetupSubsidyDecodeParam(s, 0);
|
Pair reftype = SetupSubsidyDecodeParam(s, false);
|
||||||
AddNewsItem(STR_NEWS_SERVICE_SUBSIDY_OFFERED, NS_SUBSIDIES, (NewsReferenceType)reftype.a, s->src, (NewsReferenceType)reftype.b, s->dst);
|
AddNewsItem(STR_NEWS_SERVICE_SUBSIDY_OFFERED, NS_SUBSIDIES, (NewsReferenceType)reftype.a, s->src, (NewsReferenceType)reftype.b, s->dst);
|
||||||
SetPartOfSubsidyFlag(s->src_type, s->src, POS_SRC);
|
SetPartOfSubsidyFlag(s->src_type, s->src, POS_SRC);
|
||||||
SetPartOfSubsidyFlag(s->dst_type, s->dst, POS_DST);
|
SetPartOfSubsidyFlag(s->dst_type, s->dst, POS_DST);
|
||||||
|
@ -174,7 +174,7 @@ struct SubsidyListWindow : Window {
|
|||||||
if (!s->IsAwarded()) {
|
if (!s->IsAwarded()) {
|
||||||
if (IsInsideMM(pos, 0, cap)) {
|
if (IsInsideMM(pos, 0, cap)) {
|
||||||
/* Displays the two offered towns */
|
/* Displays the two offered towns */
|
||||||
SetupSubsidyDecodeParam(s, 1);
|
SetupSubsidyDecodeParam(s, true);
|
||||||
SetDParam(7, _date - ymd.day + s->remaining * 32);
|
SetDParam(7, _date - ymd.day + s->remaining * 32);
|
||||||
DrawString(x, right, y + pos * FONT_HEIGHT_NORMAL, STR_SUBSIDIES_OFFERED_FROM_TO);
|
DrawString(x, right, y + pos * FONT_HEIGHT_NORMAL, STR_SUBSIDIES_OFFERED_FROM_TO);
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ struct SubsidyListWindow : Window {
|
|||||||
FOR_ALL_SUBSIDIES(s) {
|
FOR_ALL_SUBSIDIES(s) {
|
||||||
if (s->IsAwarded()) {
|
if (s->IsAwarded()) {
|
||||||
if (IsInsideMM(pos, 0, cap)) {
|
if (IsInsideMM(pos, 0, cap)) {
|
||||||
SetupSubsidyDecodeParam(s, 1);
|
SetupSubsidyDecodeParam(s, true);
|
||||||
SetDParam(7, s->awarded);
|
SetDParam(7, s->awarded);
|
||||||
SetDParam(8, _date - ymd.day + s->remaining * 32);
|
SetDParam(8, _date - ymd.day + s->remaining * 32);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user