Files
ReactorcoremeltdownandClaude Opus 5.5 962cfd1e2b iOS 0.4.0: Sizzle's Tracker, Mix, Toolbox and Setup tabs on the C++ engine
Ported from the Android tabs by parallel agents (each screen with its own
SizzleSession category); slot editors use the card editor with a preset
library; songs load/save in the Android project format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:32:30 +01:00

36 lines
1008 B
Plaintext

// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
#import "SizzleSession+Setup.h"
#import "SizzleSession+Internal.h"
#include "io/KotlinText.hpp"
using namespace sizzle;
static NSError *setupError(NSString *msg) {
return [NSError errorWithDomain:@"Sizzle" code:1 userInfo:@{NSLocalizedDescriptionKey: msg}];
}
@implementation SizzleSession (Setup)
+ (BOOL)looksLikeProjectText:(NSString *)text {
std::string t = text.UTF8String ?: "";
for (const std::string &raw : io::kt::lines(t)) {
const std::string line = io::kt::trim(raw);
if (line.empty()) continue;
return line == "SIZZLETRACKER-SNG 1";
}
return NO;
}
- (BOOL)importProjectText:(NSString *)text error:(NSError **)error {
if (![SizzleSession looksLikeProjectText:text]) {
if (error) *error = setupError(@"This doesn't look like a Sizzle project (.szg).");
return NO;
}
return [self loadProjectText:text error:error];
}
@end