planetmaker wrote:
Improvements to game speed are always welcome.
Do you have any testing data which prove one way or the other being advantegous?
This is very unlikely to be faster (instruction-wise). On the other hand, it also won't be much slower. But I also don't think that is his point, to make the game faster. More to make it more readable / sane.
What I like about this idea is, that it makes everything a bit more dynamic. It needs a few more refactoring to be more C++ (abstract class which gets added, which has a member which does the gameloop, for example, or even where you can specify DailyLoop, MontlyLoop, etc). It might just make the code more readable. But I am not sure yet what I like more.
Regarding your patch itself, there are some silly statements. First, _daily_calls for sure can be a dynamic array (a *_daily_calls, as you called it). But as we are programming in C++ here, it is much better to use a std::list (or any of his friends, I am guessing a std::vector would do? Not sure). There is no need to do this the C way.
Also, if you would be to go C++ style with classes, you can make the ctor automatically register itself to the dailyloop if needed, avoiding the AddDailyCall calls

Just my 2 penny.