- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
From the JassHelper manual:
It appears to have more structs than JASS_MAX_ARRAY_SIZE, we simply write in the number we want as if it were an array besides the struct name declaration.
However, what are the penalties for doing this? Would I expect a very serious performance penalty? Or will not even be noticeable in most cases?
Also, what is the highest value that can be put there, i.e.
How big can N be?
Also, from the same manual:
So here is a struct of mine, which is a fancy wrapper around a rect.
where MAX_QUADS = 5, and BOLTS_PER_RECT = 4.
With 8190 index, space, this means that I can have at most 8190 / 5 = 1638 instances of a Quad struct. Considering the recursive nature of this struct, would I be able to increase the instance limit by doing
So now I could have 10,000 instances of a Quad struct?
From the JassHelper manual:
For some reason, the 8190 instances limit is not enough for us, we need 10000 instances ! so:
struct X[10000]
integer a
integer b
endstruct
It appears to have more structs than JASS_MAX_ARRAY_SIZE, we simply write in the number we want as if it were an array besides the struct name declaration.
However, what are the penalties for doing this? Would I expect a very serious performance penalty? Or will not even be noticeable in most cases?
Also, what is the highest value that can be put there, i.e.
JASS:
struct A[N]
…
How big can N be?
Also, from the same manual:
Not to be confused with an instance limit improvement, it is an improvement for index space, both terms are usually equivalent unless there are array members involved
So here is a struct of mine, which is a fancy wrapper around a rect.
JASS:
struct Quad
rect r
real maxX
real minX
real maxY
real minY
real area
lightning array bolts[BOLTS_PER_RECT]
Quad array subQuads[MAX_QUADS]
…
endstruct
where MAX_QUADS = 5, and BOLTS_PER_RECT = 4.
With 8190 index, space, this means that I can have at most 8190 / 5 = 1638 instances of a Quad struct. Considering the recursive nature of this struct, would I be able to increase the instance limit by doing
JASS:
struct Quad[50000]
…
endstruct
So now I could have 10,000 instances of a Quad struct?