From 3b96ad994c43581918c3a5fa060f184d2c730f71 Mon Sep 17 00:00:00 2001 From: darkvater Date: Wed, 1 Sep 2004 21:54:12 +0000 Subject: (svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of company value). Water floods HQ. -Some layout fixes for command.c -Tileinfo debug window in console now shows Tile in decimal numbers --- economy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'economy.c') diff --git a/economy.c b/economy.c index eef997e67..5504f0fab 100644 --- a/economy.c +++ b/economy.c @@ -12,7 +12,7 @@ #include "industry.h" #include "town.h" -static void UpdatePlayerHouse(Player *p, uint score) +void UpdatePlayerHouse(Player *p, uint score) { byte val; uint tile = p->location_of_house; @@ -82,7 +82,7 @@ uint32 CalculateCompanyValue(Player *p) { // if update is set to true, the economy is updated with this score // (also the house is updated, should only be true in the on-tick event) -void UpdateCompanyRatingAndValue(Player *p, bool update) +int UpdateCompanyRatingAndValue(Player *p, bool update) { byte owner = p->index; int score = 0; @@ -225,6 +225,7 @@ void UpdateCompanyRatingAndValue(Player *p, bool update) } InvalidateWindow(WC_PERFORMANCE_DETAIL, 0); + return score; } // use 255 as new_player to delete the player. @@ -385,7 +386,7 @@ year_4: p->bankrupt_timeout = 0x456; } else { p->money64 = p->player_money = 100000000; - ChangeOwnershipOfPlayerItems(owner, 0xFF); + ChangeOwnershipOfPlayerItems(owner, 0xFF); // 255 is no owner p->is_active = false; } } -- cgit v1.2.3-54-g00ecf