Beginning config support

Currently only supports changing 4 colors
This commit is contained in:
2024-06-17 12:00:25 -04:00
parent e613a525a5
commit 7182fd9078
8 changed files with 185 additions and 11 deletions

View File

@@ -28,6 +28,7 @@
#define COLORS_H
#include "common.h"
#include "config.h"
typedef u32 Color;

45
include/config.h Normal file
View File

@@ -0,0 +1,45 @@
/*
* This file is part of Anemone3DS
* Copyright (C) 2016-2024 Contributors in CONTRIBUTORS.md
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
* * Requiring preservation of specified reasonable legal notices or
* author attributions in that material or in the Appropriate Legal
* Notices displayed by works containing it.
* * Prohibiting misrepresentation of the origin of that material,
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "common.h"
#include "fs.h"
#include <jansson.h>
typedef struct {
u32 background_color;
u32 accent_color;
u32 red_color;
u32 yellow_color;
} Config_s;
extern Config_s config;
void load_config(void);
#endif

View File

@@ -29,6 +29,7 @@
#include "common.h"
#include "badges.h"
#include "config.h"
#define ILLEGAL_CHARS "><\"?;:/\\+,.|[=]*"
@@ -54,6 +55,7 @@ typedef struct {
u32 coppa : 1;
} Parental_Restrictions_s;
Result init_sd(void);
Result open_archives(void);
Result open_badge_extdata(void);
Result close_archives(void);