Finish tests for converting legacy special nodes

This commit is contained in:
2016-09-29 22:23:17 -04:00
parent 889b0663d1
commit 8edc156496
4 changed files with 392 additions and 7 deletions

View File

@@ -1235,7 +1235,7 @@ iLiving& cParty::pc_present() const {
// stuff done legit, i.e. flags are within proper ranges for stuff done flag
bool cParty::sd_legit(short a, short b) {
if((minmax(0,349,a) == a) && (minmax(0,49,b) == b))
if((minmax(0,sdx_max,a) == a) && (minmax(0,sdy_max,b) == b))
return true;
return false;
}

View File

@@ -129,7 +129,10 @@ public:
std::map<std::string,campaign_flag_type> campaign_flags;
private:
std::map<unsigned short,std::pair<unsigned short,unsigned char>> pointers;
using sd_array = decltype(stuff_done);
public:
static const int sdx_max = std::extent<sd_array, 0>::value - 1;
static const int sdy_max = std::extent<sd_array, 1>::value - 1;
void set_ptr(unsigned short p, unsigned short sdfx, unsigned short sdfy);
void force_ptr(unsigned short p, unsigned short val);