// For some reason, ambient files are sometimes incorrectly called "AREAXLOOP" rather than "AMBIENTXLOOP"
if (GruntzGame.resourceManager().rez().file(aniRef, "ani") == null) aniRef = aniRef.replace("AREA", "AMBIENT");
// Check that the string exists
Logic log = factory.createFromWWD(logicRef, graphicRef, aniRef, Arrays.copyOfRange(s, dataOffset, dataOffset + 284));
if (log != null) logics.add(log);
else if (!logicRef.equals("GiantRock")) System.err.println("Failed to find controller for logic " + logicRef);
}
} catch (Exception e) {
// Finish parsing errors if an exception occurs