Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

<strong>Related to issue #1660</strong> - warn users if more than 255…

… OverlayTypes exist.

git-svn-id: svn://svn.renegadeprojects.com/ares/trunk@1148 859b54a9-7a54-0410-aeb3-f8d2f1fa40fd
  • Loading branch information...
commit efc39d4310db1d09ceefa4c125e092bb007ea7aa 1 parent 925df59
@DCoderLT DCoderLT authored
Showing with 13 additions and 8 deletions.
  1. +1 −1  src/Ares.version.h
  2. +12 −7 src/Misc/Invalidators.cpp
View
2  src/Ares.version.h
@@ -3,7 +3,7 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 1
-#define VERSION_REVISION 1146
+#define VERSION_REVISION 1148
#define SAVEGAME_MAGIC ((VERSION_MAJOR << 24) | (VERSION_MINOR << 16) | (VERSION_REVISION))
View
19 src/Misc/Invalidators.cpp
@@ -3,6 +3,7 @@
#include <WeaponTypeClass.h>
#include <AnimClass.h>
#include <InfantryClass.h>
+#include <OverlayTypeClass.h>
#include <ScenarioClass.h>
#include <HouseClass.h>
#include "Debug.h"
@@ -143,14 +144,18 @@ DEFINE_HOOK(687C16, INIClass_ReadScenario_ValidateThings, 6)
}
}
- for(auto i = 0; i < RulesClass::Instance->BuildConst.Count; ++i) {
- auto BC = RulesClass::Instance->BuildConst.GetItem(i);
- if(!BC->AIBuildThis) {
- Debug::DevLog(Debug::Warning, "[AI]BuildConst= includes [%s], which doesn't have AIBuildThis=yes!\n", BC->ID);
- }
- }
+ for(auto i = 0; i < RulesClass::Instance->BuildConst.Count; ++i) {
+ auto BC = RulesClass::Instance->BuildConst.GetItem(i);
+ if(!BC->AIBuildThis) {
+ Debug::DevLog(Debug::Warning, "[AI]BuildConst= includes [%s], which doesn't have AIBuildThis=yes!\n", BC->ID);
+ }
+ }
+
+ if(OverlayTypeClass::Array->Count > 255) {
+ Debug::DevLog(Debug::Warning, "Only 255 OverlayTypes are supported.\n");
+ }
- if(Ares::bStrictParser && Debug::bParserErrorDetected) {
+ if(Ares::bStrictParser && Debug::bParserErrorDetected) {
Debug::FatalErrorAndExit("One or more errors were detected while parsing the INI files.\r\n"
"Please review the contents of the debug log and correct them.");
}
Please sign in to comment.
Something went wrong with that request. Please try again.