From 8d1f39d2352a6a8bc01940542b96a6d58072d093 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Mon, 4 Sep 2017 16:18:07 +0200 Subject: [PATCH] Source code reorgnaizations --- .gitignore | 1 + Makefile | 4 ++-- source/common/common.h | 2 +- source/{font => common}/font.h | 0 source/{font => common}/font_6x10.h | 0 source/{font => common}/font_acorn_8x8.h | 0 source/{font => common}/font_gb_7x6.h | 0 source/{font => common}/font_orig.h | 0 source/filesys/filetype.c | 2 +- source/godmode.c | 2 +- source/{nand => utils}/ctrtransfer.c | 0 source/{nand => utils}/ctrtransfer.h | 0 source/{game => utils}/gameutil.c | 0 source/{game => utils}/gameutil.h | 0 source/{game => utils}/keydbutil.c | 0 source/{game => utils}/keydbutil.h | 0 source/{nand => utils}/nandutil.c | 0 source/{nand => utils}/nandutil.h | 0 source/{filesys/fsscript.c => utils/scripting.c} | 2 +- source/{filesys/fsscript.h => utils/scripting.h} | 0 source/{system => utils}/sysinfo.c | 0 source/{system => utils}/sysinfo.h | 0 22 files changed, 7 insertions(+), 6 deletions(-) rename source/{font => common}/font.h (100%) rename source/{font => common}/font_6x10.h (100%) rename source/{font => common}/font_acorn_8x8.h (100%) rename source/{font => common}/font_gb_7x6.h (100%) rename source/{font => common}/font_orig.h (100%) rename source/{nand => utils}/ctrtransfer.c (100%) rename source/{nand => utils}/ctrtransfer.h (100%) rename source/{game => utils}/gameutil.c (100%) rename source/{game => utils}/gameutil.h (100%) rename source/{game => utils}/keydbutil.c (100%) rename source/{game => utils}/keydbutil.h (100%) rename source/{nand => utils}/nandutil.c (100%) rename source/{nand => utils}/nandutil.h (100%) rename source/{filesys/fsscript.c => utils/scripting.c} (99%) rename source/{filesys/fsscript.h => utils/scripting.h} (100%) rename source/{system => utils}/sysinfo.c (100%) rename source/{system => utils}/sysinfo.h (100%) diff --git a/.gitignore b/.gitignore index e630646..63bd618 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ # User additions /data/aeskeydb.bin +/data/aeskeydb_.bin /zzz_backup diff --git a/Makefile b/Makefile index 32fc5da..f5d7e75 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,9 @@ ifeq ($(SAFEMODE),1) export TARGET := SafeMode9 endif BUILD := build -SOURCES := source source/common source/filesys source/crypto source/fatfs source/nand source/virtual source/game source/gamecart source/quicklz source/system +SOURCES := source source/common source/filesys source/crypto source/fatfs source/nand source/virtual source/game source/gamecart source/quicklz source/system source/utils DATA := data -INCLUDES := common source source/common source/font source/filesys source/crypto source/fatfs source/nand source/virtual source/game source/gamecart source/quicklz source/system +INCLUDES := common source source/common source/font source/filesys source/crypto source/fatfs source/nand source/virtual source/game source/gamecart source/quicklz source/system source/utils #--------------------------------------------------------------------------------- # options for code generation diff --git a/source/common/common.h b/source/common/common.h index 2c5d8ad..326cbc8 100644 --- a/source/common/common.h +++ b/source/common/common.h @@ -78,7 +78,7 @@ // buffer area defines (in use by sddata.c) #define SDCRYPT_BUFFER ((u8*)0x21400000) #define SDCRYPT_BUFFER_SIZE (0x100000) -// buffer area defines (in use by fsscript.c) +// buffer area defines (in use by scripting.c) #define SCRIPT_BUFFER ((u8*)0x21500000) #define SCRIPT_BUFFER_SIZE (0x100000) // buffer area defines (in use by vgame.c) diff --git a/source/font/font.h b/source/common/font.h similarity index 100% rename from source/font/font.h rename to source/common/font.h diff --git a/source/font/font_6x10.h b/source/common/font_6x10.h similarity index 100% rename from source/font/font_6x10.h rename to source/common/font_6x10.h diff --git a/source/font/font_acorn_8x8.h b/source/common/font_acorn_8x8.h similarity index 100% rename from source/font/font_acorn_8x8.h rename to source/common/font_acorn_8x8.h diff --git a/source/font/font_gb_7x6.h b/source/common/font_gb_7x6.h similarity index 100% rename from source/font/font_gb_7x6.h rename to source/common/font_gb_7x6.h diff --git a/source/font/font_orig.h b/source/common/font_orig.h similarity index 100% rename from source/font/font_orig.h rename to source/common/font_orig.h diff --git a/source/filesys/filetype.c b/source/filesys/filetype.c index 2e1aa25..9d4320e 100644 --- a/source/filesys/filetype.c +++ b/source/filesys/filetype.c @@ -5,7 +5,7 @@ #include "game.h" #include "keydb.h" #include "ctrtransfer.h" -#include "fsscript.h" +#include "scripting.h" u32 IdentifyFileType(const char* path) { const u8 romfs_magic[] = { ROMFS_MAGIC }; diff --git a/source/godmode.c b/source/godmode.c index 8abc316..6e33a2c 100644 --- a/source/godmode.c +++ b/source/godmode.c @@ -6,7 +6,7 @@ #include "fsutil.h" #include "fsperm.h" #include "fsgame.h" -#include "fsscript.h" +#include "scripting.h" #include "gameutil.h" #include "keydbutil.h" #include "nandutil.h" diff --git a/source/nand/ctrtransfer.c b/source/utils/ctrtransfer.c similarity index 100% rename from source/nand/ctrtransfer.c rename to source/utils/ctrtransfer.c diff --git a/source/nand/ctrtransfer.h b/source/utils/ctrtransfer.h similarity index 100% rename from source/nand/ctrtransfer.h rename to source/utils/ctrtransfer.h diff --git a/source/game/gameutil.c b/source/utils/gameutil.c similarity index 100% rename from source/game/gameutil.c rename to source/utils/gameutil.c diff --git a/source/game/gameutil.h b/source/utils/gameutil.h similarity index 100% rename from source/game/gameutil.h rename to source/utils/gameutil.h diff --git a/source/game/keydbutil.c b/source/utils/keydbutil.c similarity index 100% rename from source/game/keydbutil.c rename to source/utils/keydbutil.c diff --git a/source/game/keydbutil.h b/source/utils/keydbutil.h similarity index 100% rename from source/game/keydbutil.h rename to source/utils/keydbutil.h diff --git a/source/nand/nandutil.c b/source/utils/nandutil.c similarity index 100% rename from source/nand/nandutil.c rename to source/utils/nandutil.c diff --git a/source/nand/nandutil.h b/source/utils/nandutil.h similarity index 100% rename from source/nand/nandutil.h rename to source/utils/nandutil.h diff --git a/source/filesys/fsscript.c b/source/utils/scripting.c similarity index 99% rename from source/filesys/fsscript.c rename to source/utils/scripting.c index c93e1b4..fb262fe 100644 --- a/source/filesys/fsscript.c +++ b/source/utils/scripting.c @@ -1,4 +1,4 @@ -#include "fsscript.h" +#include "scripting.h" #include "fsutil.h" #include "fsinit.h" #include "fsperm.h" diff --git a/source/filesys/fsscript.h b/source/utils/scripting.h similarity index 100% rename from source/filesys/fsscript.h rename to source/utils/scripting.h diff --git a/source/system/sysinfo.c b/source/utils/sysinfo.c similarity index 100% rename from source/system/sysinfo.c rename to source/utils/sysinfo.c diff --git a/source/system/sysinfo.h b/source/utils/sysinfo.h similarity index 100% rename from source/system/sysinfo.h rename to source/utils/sysinfo.h