From b163cbbdcd89449f99e0565696cb6d2a6e2ca3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hinrichs?= Date: Sun, 12 Nov 2006 18:39:24 +0000 Subject: [PATCH] Increase the constant MaxLoop to 65536 to support WML events for maps up to 256*256. --- src/game_events.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/game_events.cpp b/src/game_events.cpp index 5d0713004b3..dfa198e6aed 100644 --- a/src/game_events.cpp +++ b/src/game_events.cpp @@ -173,7 +173,16 @@ namespace { std::set used_items; -const size_t MaxLoop = 1024; +/* +jhinrichs, 12.11.2006: +This variable controls the maximum number of hexes in a map, that can be parsed by an event. +It was set to 1024 before and for larger maps this could become a problem. So it is raised to +65536 now, which can feature a map of size 256*256 (maps really shouldn't be bigger than that :-). +This constant also controls the maximum number of loops for a WML while loop (hence its name). +If this is felt to be too high now, we must split it into two constants, but i don't feel the need +at the moment. +*/ +const size_t MaxLoop = 65536; bool events_init() { return screen != NULL; }