Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13324) Move do_*_cost into techtools
Home

[Freeciv-Dev] (PR#13324) Move do_*_cost into techtools

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13324) Move do_*_cost into techtools
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Fri, 24 Jun 2005 02:04:51 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13324 >

I forgot to move those functions into techtools.c. Here's a patch
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.392
diff -u -r1.392 plrhand.c
--- server/plrhand.c    23 Jun 2005 21:58:23 -0000      1.392
+++ server/plrhand.c    24 Jun 2005 09:03:02 -0000
@@ -69,42 +69,6 @@
                                             struct player *receiver);
 
 /**************************************************************************
-...
-**************************************************************************/
-void do_dipl_cost(struct player *pplayer)
-{
-  struct player_research * research = get_player_research(pplayer);
-
-  research->bulbs_researched
-    -= (total_bulbs_required(pplayer) * game.info.diplcost) / 100;
-  research->changed_from = -1;
-}
-
-/**************************************************************************
-...
-**************************************************************************/
-void do_free_cost(struct player *pplayer)
-{
-  struct player_research * research = get_player_research(pplayer);
-
-  research->bulbs_researched
-    -= (total_bulbs_required(pplayer) * game.info.freecost) / 100;
-  research->changed_from = -1;
-}
-
-/**************************************************************************
-...
-**************************************************************************/
-void do_conquer_cost(struct player *pplayer)
-{
-  struct player_research * research = get_player_research(pplayer);  
-
-  research->bulbs_researched
-    -= (total_bulbs_required(pplayer) * game.info.conquercost) / 100;
-  research->changed_from = -1;
-}
-
-/**************************************************************************
   Send end-of-turn notifications relevant to specified dests.
   If dest is NULL, do all players, sending to pplayer->connections.
 **************************************************************************/
Index: server/plrhand.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.h,v
retrieving revision 1.75
diff -u -r1.75 plrhand.h
--- server/plrhand.h    23 Jun 2005 21:58:23 -0000      1.75
+++ server/plrhand.h    24 Jun 2005 09:03:02 -0000
@@ -65,10 +65,6 @@
 
 void send_player_turn_notifications(struct conn_list *dest);
 
-void do_dipl_cost(struct player *pplayer);
-void do_free_cost(struct player *pplayer);
-void do_conquer_cost(struct player *pplayer);
-
 void shuffle_players(void);
 void set_shuffled_players(int *shuffled_players);
 struct player *shuffled_player(int i);
Index: server/techtools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/techtools.c,v
retrieving revision 1.1
diff -u -r1.1 techtools.c
--- server/techtools.c  23 Jun 2005 21:58:24 -0000      1.1
+++ server/techtools.c  24 Jun 2005 09:03:03 -0000
@@ -41,6 +41,42 @@
 #include "techtools.h"
 #include "unittools.h"
 
+/**************************************************************************
+...
+**************************************************************************/
+void do_dipl_cost(struct player *pplayer)
+{
+  struct player_research * research = get_player_research(pplayer);
+
+  research->bulbs_researched
+    -= (total_bulbs_required(pplayer) * game.info.diplcost) / 100;
+  research->changed_from = -1;
+}
+
+/**************************************************************************
+...
+**************************************************************************/
+void do_free_cost(struct player *pplayer)
+{
+  struct player_research * research = get_player_research(pplayer);
+
+  research->bulbs_researched
+    -= (total_bulbs_required(pplayer) * game.info.freecost) / 100;
+  research->changed_from = -1;
+}
+
+/**************************************************************************
+...
+**************************************************************************/
+void do_conquer_cost(struct player *pplayer)
+{
+  struct player_research * research = get_player_research(pplayer);  
+
+  research->bulbs_researched
+    -= (total_bulbs_required(pplayer) * game.info.conquercost) / 100;
+  research->changed_from = -1;
+}
+
 /****************************************************************************
   Called to find and choose (pick) a research target on the way to the
   player's goal.  Return TRUE iff the tech is set.
Index: server/techtools.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/techtools.h,v
retrieving revision 1.1
diff -u -r1.1 techtools.h
--- server/techtools.h  23 Jun 2005 21:58:24 -0000      1.1
+++ server/techtools.h  24 Jun 2005 09:03:03 -0000
@@ -16,6 +16,10 @@
 #include "player.h"
 #include "tech.h"
 
+void do_dipl_cost(struct player *pplayer);
+void do_free_cost(struct player *pplayer);
+void do_conquer_cost(struct player *pplayer);
+
 void do_tech_parasite_effect(struct player *pplayer);
 void found_new_tech(struct player *plr, Tech_type_id tech_found,
                    bool was_discovery, bool saving_bulbs,

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13324) Move do_*_cost into techtools, Mateusz Stefek <=