- Fixed issues with loading scenarios caused by the struct alignments added in revision 63.
- Fixed a potential memory leak in load_scenario() in which new was essentially called twice in a row. - Added a max_items() function to the town record classes, in preparation for an eventual removal of the limit on preset items. git-svn-id: http://openexile.googlecode.com/svn/trunk@66 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -259,3 +259,15 @@ short cMedTown::max_monst(){
|
||||
short cTinyTown::max_monst(){
|
||||
return 30;
|
||||
}
|
||||
|
||||
short cBigTown::max_items(){
|
||||
return 64;
|
||||
}
|
||||
|
||||
short cMedTown::max_items(){
|
||||
return 64;
|
||||
}
|
||||
|
||||
short cTinyTown::max_items(){
|
||||
return 64;
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@ public:
|
||||
unsigned char& lighting(size_t i, size_t r);
|
||||
short max_dim();
|
||||
short max_monst();
|
||||
short max_items();
|
||||
|
||||
cBigTown();
|
||||
void writeTo(std::ostream& file);
|
||||
@@ -50,6 +51,7 @@ public:
|
||||
unsigned char& lighting(size_t i, size_t r);
|
||||
short max_dim();
|
||||
short max_monst();
|
||||
short max_items();
|
||||
|
||||
cMedTown();
|
||||
void writeTo(std::ostream& file);
|
||||
@@ -69,6 +71,7 @@ public:
|
||||
unsigned char& lighting(size_t i, size_t r);
|
||||
short max_dim();
|
||||
short max_monst();
|
||||
short max_items();
|
||||
|
||||
cTinyTown();
|
||||
void writeTo(std::ostream& file);
|
||||
|
@@ -37,3 +37,7 @@ short cBigTemplTown::max_dim(){
|
||||
short cBigTemplTown::max_monst(){
|
||||
return 30;
|
||||
}
|
||||
|
||||
short cBigTemplTown::max_items(){
|
||||
return 64;
|
||||
}
|
||||
|
@@ -45,6 +45,7 @@ public:
|
||||
unsigned char& lighting(size_t i, size_t r);
|
||||
short max_dim();
|
||||
short max_monst();
|
||||
short max_items();
|
||||
void writeTo(std::ostream& file);
|
||||
};
|
||||
|
||||
@@ -61,6 +62,7 @@ public:
|
||||
unsigned char& lighting(size_t i, size_t r);
|
||||
short max_dim();
|
||||
short max_monst();
|
||||
short max_items();
|
||||
void writeTo(std::ostream& file);
|
||||
};
|
||||
|
||||
@@ -77,6 +79,7 @@ public:
|
||||
unsigned char& lighting(size_t i, size_t r);
|
||||
short max_dim();
|
||||
short max_monst();
|
||||
short max_items();
|
||||
};
|
||||
|
||||
// City blocks - I want to figure out how to use these sometime.
|
||||
|
@@ -101,6 +101,7 @@ public:
|
||||
virtual unsigned char& lighting(size_t i, size_t r) = 0;
|
||||
virtual short max_dim() = 0;
|
||||
virtual short max_monst() = 0;
|
||||
virtual short max_items() = 0;
|
||||
|
||||
cTown();
|
||||
cTown(short size);
|
||||
|
Reference in New Issue
Block a user