Move NSFW mode to an asset pack

This commit is contained in:
Willy-JL
2023-02-10 03:14:40 +00:00
parent 0a6f830ad0
commit 955e16b0ef
2238 changed files with 50 additions and 125 deletions

View File

@@ -13,7 +13,7 @@
#include "animation_storage.h"
#include "animation_manager.h"
#include "../../../settings/xtreme_settings/xtreme_settings.h"
#include "../../../settings/xtreme_settings/xtreme_assets.h"
#define TAG "AnimationManager"
@@ -580,7 +580,7 @@ static void animation_manager_switch_to_one_shot_view(AnimationManager* animatio
View* next_view = one_shot_view_get_view(animation_manager->one_shot_view);
view_stack_remove_view(animation_manager->view_stack, prev_view);
view_stack_add_view(animation_manager->view_stack, next_view);
if(XTREME_SETTINGS()->nsfw_mode) {
if(XTREME_ASSETS()->is_nsfw) {
one_shot_view_start_animation(animation_manager->one_shot_view, &A_Levelup1_128x64);
} else {
if(stats.level <= 20) {

View File

@@ -40,7 +40,7 @@ void animation_handler_select_manifest() {
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
Storage* storage = furi_record_open(RECORD_STORAGE);
if(storage_common_stat(storage, furi_string_get_cstr(manifest), NULL) == FSE_OK) {
FURI_LOG_I(TAG, "Custom Manifest selected");
FURI_LOG_I(TAG, "Custom manifest selected");
} else {
use_asset_pack = false;
}
@@ -48,14 +48,8 @@ void animation_handler_select_manifest() {
}
if(!use_asset_pack) {
furi_string_set(anim_dir, BASE_ANIMATION_DIR);
if(xtreme_settings->nsfw_mode) {
furi_string_cat_str(anim_dir, "/nsfw");
FURI_LOG_I(TAG, "NSFW Manifest selected");
} else {
furi_string_cat_str(anim_dir, "/sfw");
FURI_LOG_I(TAG, "SFW Manifest selected");
}
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
FURI_LOG_I(TAG, "Base manifest selected");
}
strlcpy(ANIMATION_DIR, furi_string_get_cstr(anim_dir), sizeof(ANIMATION_DIR));
strlcpy(

View File

@@ -1,7 +1,7 @@
#include <furi_hal.h>
#include "../desktop_i.h"
#include "../../../settings/xtreme_settings/xtreme_settings.h"
#include "../../../settings/xtreme_settings/xtreme_assets.h"
#define DesktopFaultEventExit 0x00FF00FF
@@ -15,7 +15,7 @@ void desktop_scene_fault_on_enter(void* context) {
Popup* popup = desktop->hw_mismatch_popup;
popup_set_context(popup, desktop);
if(XTREME_SETTINGS()->nsfw_mode) {
if(XTREME_ASSETS()->is_nsfw) {
popup_set_header(
popup,
"Slut passed out\n but is now back",