View Single Post
Old 12-06-2009, 01:07 AM   #3119
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 163

Barade is on a distinguished road (14)

Default

Probably there was already some of kind of this suggestion. Anyways, did you consider using a global hashtable for saving struct member or array member data for avoiding Jass array limit sizes? Maybe a keyword like "big" or something else could declare structs or arrays as "hashtable stored data structs" that you won't suffer the loss of performance when using small arrays or structs.

When I was thinking about virtual methods in vJass I had the idea to save prototype triggers in this global hashtable and saving the prototype ids of all virtual methods for each instance when allocating it. Thus when a virtual method is called by an instance the prototype id is taken from the hashtable and the right trigger is called. Of course virtual methods would could only be called then by .execute or .evaluate.
I think "stub" doesn't provide this feature (which surely isn't required often but would be useful in some ways).
Btw. what does TriggerExecuteWait do exactly? Looks like execution without ignoring TriggerSleepAction calls which doesn't really make sense (considering its name) but is required very often?!

edit:
Of course you could do that virtual method trigger thing without a global hash table just using an array of triggers ...
__________________
Barade is offline   Reply With Quote