136,27 → 136,8 |
gdata->parm.map_used[i] = maps[i] || (checksliders_result & CHECKSLIDERS_MAP_AMBIGUOUS); |
needui |= gdata->parm.map_used[i]; |
GetDlgItemText(dp,FIRSTMAPNAMEITEM+i,s,MAXFIELD); myc2pstrcpy(gdata->parm.map[i],s); |
if (!expr[i]) { |
simplealert("Bug! see builddlgitem"); |
return true; // keep going. Let the user try again |
strcpy((char*)gdata->parm.formula[i],expr[i] ? expr[i] : "bug! see builddlgitem"); |
} |
if (strlen(expr[i]) >= sizeof(gdata->parm.formula[i])) { |
if (i == 0) { |
simplealert("Attention! The formula for channel R was too long (longer than 1023 characters) and was truncated."); |
} |
else if (i == 1) { |
simplealert("Attention! The formula for channel G was too long (longer than 1023 characters) and was truncated."); |
} |
else if (i == 2) { |
simplealert("Attention! The formula for channel B was too long (longer than 1023 characters) and was truncated."); |
} |
else if (i == 3) { |
simplealert("Attention! The formula for channel A was too long (longer than 1023 characters) and was truncated."); |
} |
expr[i][sizeof(gdata->parm.formula[i]) - 1] = '\0'; |
} |
strcpy((char*)gdata->parm.formula[i], expr[i]); // Attention! This is not a Pascal string! |
} |
gdata->parm.popDialog = needui; //true if need to pop a parameter dialog |
gdata->parm.unknown1 = gdata->parm.unknown2 = gdata->parm.unknown3 = 0; |
gdata->parm.iProtected = ISDLGBUTTONCHECKED(dp,PROTECTITEM); // == 1 means protected |