15 result.
warnings.push_back(absl::StrFormat(
16 "High object count (%zu > %d). May cause lag or memory issues.",
21 size_t sprite_count = room.
GetSprites().size();
24 absl::StrFormat(
"Too many sprites (%zu > %d). Game limit is strict.",
40 if (obj.id_ >= 0xF9 && obj.id_ <= 0xFD) {
46 result.
errors.push_back(absl::StrFormat(
47 "Too many chests (%d > %d). Item collection flags will conflict.",
55 const int layer =
static_cast<int>(obj.GetLayerValue());
56 if (layer < 0 || layer > 2) {
57 result.
errors.push_back(absl::StrFormat(
58 "Object 0x%02X has invalid layer %d", obj.id_, layer));
60 }
else if (layer == 2) {
65 if (layer == 2 && semantics.draws_to_both_bgs) {
66 result.
errors.push_back(absl::StrFormat(
67 "Object 0x%02X in BG3 is marked as Both-BGs (unsafe layer state)",
72 if (obj.x_ < 0 || obj.x_ >= 64 || obj.y_ < 0 || obj.y_ >= 64) {
73 result.
errors.push_back(absl::StrFormat(
74 "Object 0x%02X out of bounds at (%d, %d)", obj.id_, obj.x_, obj.y_));
80 result.
errors.push_back(absl::StrFormat(
81 "Too many BG3 objects (%d > %d). Reduce background-layer object count.",