michael blunck wrote:
Maybe it would be possible to have separate sprite pools for all major features: trains, rvs, ships, planes, stations, houses, industry tiles. In this way, e.g. George would get separate pools for his ECS vectors and the LVs, rather than having to coexist with houses and stations, or with trams.
We do, still there is currently a hard limit of 0xFFFF loadable sprite ids, Actions can't store more, TTD doesn't, TTDPatch either...
Please check:
http://svn.ttdpatch.net/trac/browser/tr ... rlimit.asm
And see here:
http://www.bytetransfer.de/projects/ttd ... epatch.png
The only option left is to rewrite TTD(Patch) at certain places to directly access the sprites in the grf.
The current concept: We hook all access to feature based sprite ids and convert them to real sprite ids (16bit).Then the following code checks various stuff like Sprite Size, Relative X Y to successfully change Bounding Boxes or do sprite sorting...
A new concept: Instead converting them, we find the relevant code accessing informations on sprites, rewrite them to find the relevant grf specific sprite stream (this is on some places very hard, TTD caches sprite ids so the grf is lost*) and access this Data directly. Narrow down the possible sprite sorting room to fit the current grf pointer too.
* We can't simply store a pointer in an id field as we only have 16bits and TTD alters sprite number to change directions...
----
I simply have no time to fix all bugs when I would change TTDPatch in that way and doing a branch wouldn't solve that problem either as people couldn't test it and report bugs. As the change is bigger then the last we can't do it as Patch Switch without having a huge performance penalty.