URL:
<http://gna.org/patch/?5123>
Summary: Determine max number of ai types configure time
Project: Freeciv
Submitted by: cazfi
Submitted on: Tue 26 Aug 2014 11:00:17 PM EEST
Category: bootstrap
Priority: 5 - Normal
Status: Ready For Test
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: 2.4.4, 2.5.0-beta2, 2.6.0
_______________________________________________________
Details:
Replace hardcoded max ai types count with configure time checking. If dynamic
modules are not enabled, make the count exactly the number of static modules
being built in. If dynamic modules are enabled, add 3 slots for them.
This saves some memory in typical case of one or two static modules as no
never-used pointers to ai type specific data gets added to all units and
cities.
This leaves space for future improvements on dynamic modules case. As AI
modules are loaded in the beginning of the game, we do know their number by
the time units and cities are being created and could adjust to that runtime
(not easily doable in C99, but we could conditionally make it better when
newer compiler is being used)
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 26 Aug 2014 11:00:17 PM EEST Name:
0002-Determine-max-number-of-ai-types-configure-time.patch Size: 2kB By:
cazfi
<http://gna.org/patch/download.php?file_id=21905>
-------------------------------------------------------
Date: Tue 26 Aug 2014 11:00:17 PM EEST Name:
AiTypeCountConfigureTime-S2_4.patch Size: 1kB By: cazfi
<http://gna.org/patch/download.php?file_id=21906>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?5123>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev