Cloudflare Pages / Build and verify the site (push) Successful in 3m29s
Use the verified dependency lock across native hosts and bundled apps. Preserve saved styles, local app reactivation, and offline packages while integrating the latest practice, Habits, Lumi, and figure preview updates.
89 lines
2.2 KiB
Ziran
89 lines
2.2 KiB
Ziran
#import, file "../src/app/fonts.zi";
|
|
#import, file "../src/app/app_types.zi";
|
|
|
|
c :: #system_library "c";
|
|
fixture_platform :: (platform: s32) #foreign c "fixture_platform";
|
|
fixture_preview :: (enabled: s32) #foreign c "fixture_preview";
|
|
fixture_data_count :: () -> s32 #foreign c "fixture_data_count";
|
|
fixture_file_count :: () -> s32 #foreign c "fixture_file_count";
|
|
fixture_clear_count :: () -> s32 #foreign c "fixture_clear_count";
|
|
fixture_main_otf :: () -> s32 #foreign c "fixture_main_otf";
|
|
fixture_system_count :: () -> s32 #foreign c "fixture_system_count";
|
|
fixture_system_available :: (available: s32) #foreign c "fixture_system_available";
|
|
|
|
app: InnerBreeze;
|
|
|
|
#program_export
|
|
Answer :: () -> s32 {
|
|
if LoadLocaleFont(null) {
|
|
return 1
|
|
}
|
|
|
|
fixture_platform(0)
|
|
app.language[0] = 106
|
|
app.language[1] = 97
|
|
if !LoadLocaleFont(*app) {
|
|
return 2
|
|
}
|
|
if fixture_data_count() != 1 || fixture_main_otf() == 0 {
|
|
return 3
|
|
}
|
|
RegisterLanguagePickerFonts()
|
|
RegisterLanguagePickerFonts()
|
|
if fixture_data_count() != 5 {
|
|
return 14
|
|
}
|
|
if fixture_clear_count() != 1 {
|
|
return 4
|
|
}
|
|
|
|
fixture_platform(1)
|
|
app.language[0] = 101
|
|
app.language[1] = 110
|
|
if !LoadLocaleFont(*app) {
|
|
return 5
|
|
}
|
|
if fixture_system_count() != 1 {
|
|
return 6
|
|
}
|
|
if fixture_data_count() != 6 {
|
|
return 7
|
|
}
|
|
|
|
fixture_platform(2)
|
|
if !LoadLocaleFont(*app) {
|
|
return 8
|
|
}
|
|
RegisterLanguagePickerFonts()
|
|
if fixture_system_count() != 2 || fixture_file_count() != 0 || fixture_data_count() != 6 {
|
|
return 9
|
|
}
|
|
|
|
fixture_system_available(0)
|
|
fixture_preview(1)
|
|
if !LoadLocaleFont(*app) {
|
|
return 10
|
|
}
|
|
if fixture_clear_count() != 3 {
|
|
return 11
|
|
}
|
|
if fixture_data_count() != 7 {
|
|
return 15
|
|
}
|
|
RegisterLanguagePickerFonts()
|
|
RegisterLanguagePickerFonts()
|
|
if fixture_data_count() != 11 {
|
|
return 16
|
|
}
|
|
ReleaseLocaleFont(*app)
|
|
if fixture_clear_count() != 3 {
|
|
return 12
|
|
}
|
|
fixture_preview(0)
|
|
ReleaseLocaleFont(*app)
|
|
if fixture_clear_count() != 4 {
|
|
return 13
|
|
}
|
|
return 42
|
|
}
|