 |
|  |
 |
|
ahenobarb
|
|
I'd prefer dropping the #define all together and letting the program check the number of available sprites. That way it's scalable and you can slip in and out sprites you want/don't want. Why have a limit when you can just ask the program to count through the available sprites once at the beginning of the game and assign the total to a variable.
Since, IIRC all of the sprites have their specific numbers built into the file names, it shouldn't be a problem associating the right unit with the right sprite in the units.txt file.
Also, as Dale mentions this has the virtue of only using the amount of virtual memory you actually need.
|
|
|  |
 |
|
DDowell
|
|
Västerås, Sweden
Nov 2001 time: 06:31
|
|
quote: Originally posted by E
Will it be possible to rename sprites other than the number convention? I remember the big problem of new sprites sharing the same number. |
Yes, but it might be to cumbersome to implement. We could maybe do it by not having a maximum at all but read in all sprites that exist in the folder (and are necessary to play the selected scenario/mod). That shouldn't be too difficult I reckon.
|
|
|  |
 |
|
MrBaggins
|
|
Hmm.. might not be that simple
If sprites are loaded onto a DD surface in GFX Card texture memory (limited resource, unless you have a latest and greatest graphics card, basically,) then we may have a problem with capacity, other than changing a number. It just depends how they did the DirectDraw stuff.
I'll take a look at some point soon.
|
|
|  |
 |
|
DDowell
|
|
Västerås, Sweden
Nov 2001 time: 06:31
|
|
As far as I can understand from browsing the source, the sprite numbers in the newsprite.txt has no limit, it is only the constant k_MAX_SPRITES that cause the limit.
Therefore we could simply remove the constant and voila! No limit whatsoever!
|
|
|  |
 |
|
DDowell
|
|
Västerås, Sweden
Nov 2001 time: 06:31
|
|
quote: Originally posted by Martin Gühmann
Unfortunatly it isn't such simple, this constant is used to datamine how much space is reserved for the sprites that the game loads, so just removing it would prevent the code from compiling, increasing it means using more memory and more time to fill it. Maybe 300 sprites of each type is ok, but this isn't very intelegent. The best solution is to make it so that as much memory is used as needed. And that is a little bit more tricky.
-Martin |
I agree with that. But regarding the reservation of space it is merely used to created an array of pointers. Therefore, the amount of memory used up by that array is quite small.
|
|
|  |
 |
|
Gilgamensch
|
|
France
Jun 2002 time: 06:31
|
|
I know my computer is kind of ancient *grumble* but I don't think we shall not put a limit. It would make it a bit easier to keep an overview for moders, if they know there is a limit. Also we would prevent to many 'complaints' because of no limits (maybe).
But putting the limit into a .txt file might be easiest to adjust.
|
|
|  |
 |
|
stankarp
|
|
australia
Feb 2002 time: 05:31
|
|
Quick question.
Has anyone managed to increase the number of unit sprites available in the game?
I would have thought 250 or 300 would be about the max to allow some new units as well as civ specific plus possibly other special units such as leaders tec?
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:31. Apolyton Time is 00:31. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|