storing location into array funniness

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Soliton
Site Administrator
Posts: 1688
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Post by Soliton »

Yogi Bear wrote:Glad that works :) . I asked Soliton to fix it since my svn files are a little outdated at the moment. Should soon be in.
Well, I've done that now (revision 13742). But it does look like MaxLoop is indeed used for several other limits as well, so you should please take a closer look if that is really desired in all cases. Also there is another MaxLoop defined in gamestatus.cpp that might be related and could need increasing, too.
"If gameplay requires it, they can be made to live on Venus." -- scott
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

Soliton wrote:it does look like MaxLoop is indeed used for several other limits as well, so you should please take a closer look if that is really desired in all cases. Also there is another MaxLoop defined in gamestatus.cpp that might be related and could need increasing, too.
MaxLoop is also defining maximum iterations of while loops (although there is no real need for these two cases to share the same limit - indeed the while loop should have the same limit as maximum array size).

In gamestatus.cpp, the MaxLoop variable defines the maximum size of arrays (1024). I don't see a problem with this limit, since having arrays of greater sizes would greatly impede the game in all other respects (most significantly saves).

So while I'd like to be able to store_locations on maps bigger than 32 x 32 (which is the maximum at 1024), I don't think the limit for array size and while iterations needs to be increased.

P.S. I have not witnessed any problems so far with the new setting when playing/observing.
Post Reply