From f4a3c80af341bcb1dac30a4dcd4dc5797f9adcea Mon Sep 17 00:00:00 2001 From: EpochFlame <82550703+EpochFlame@users.noreply.github.com> Date: Tue, 4 Jan 2022 12:09:53 -0500 Subject: [PATCH] decompile jstudio-data.cpp (#174) * decompile jstudio-data.cpp did this earlier for Pikmin 2 * clarify stb-data * clarify fvb-data * formatting * clang-format properly --- libs/JSystem/JStudio/JStudio/fvb-data.cpp | 42 ++++--------------- libs/JSystem/JStudio/JStudio/jstudio-data.cpp | 42 ++----------------- .../JStudio/JStudio/stb-data-parse.cpp | 2 +- libs/JSystem/JStudio/JStudio/stb-data.cpp | 18 +------- libs/JSystem/JSupport/JSUList.cpp | 2 +- libs/SSystem/SComponent/c_cc_d.cpp | 2 +- 6 files changed, 16 insertions(+), 92 deletions(-) diff --git a/libs/JSystem/JStudio/JStudio/fvb-data.cpp b/libs/JSystem/JStudio/JStudio/fvb-data.cpp index 0b49d483220..c9f65f94e93 100644 --- a/libs/JSystem/JStudio/JStudio/fvb-data.cpp +++ b/libs/JSystem/JStudio/JStudio/fvb-data.cpp @@ -1,35 +1,7 @@ -// -// Generated By: dol2asm -// Translation Unit: fvb-data -// - -#include "JSystem/JStudio/JStudio/fvb-data.h" -#include "dol2asm.h" -#include "dolphin/types.h" - -// -// Types: -// - -// -// Forward References: -// - -extern "C" f32 ga4cSignature__Q37JStudio3fvb4data[1 + 1 /* padding */]; - -// -// External References: -// - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 80455450-80455458 003A50 0004+04 0/0 1/1 0/0 .sdata2 ga4cSignature__Q37JStudio3fvb4data - */ -SECTION_SDATA2 f32 JStudio::fvb::data::ga4cSignature[1 + 1 /* padding */] = { - 13712.5f, - /* padding */ - 0.0f, -}; +namespace JStudio { +namespace fvb { +namespace data { +extern const char ga4cSignature[] = "FVB"; +} // namespace data +} // namespace fvb +} // namespace JStudio diff --git a/libs/JSystem/JStudio/JStudio/jstudio-data.cpp b/libs/JSystem/JStudio/JStudio/jstudio-data.cpp index a4aaef29c25..efe27e89810 100644 --- a/libs/JSystem/JStudio/JStudio/jstudio-data.cpp +++ b/libs/JSystem/JStudio/JStudio/jstudio-data.cpp @@ -1,39 +1,5 @@ -// -// Generated By: dol2asm -// Translation Unit: jstudio-data -// - -#include "JSystem/JStudio/JStudio/jstudio-data.h" -#include "dol2asm.h" -#include "dolphin/types.h" - -// -// Types: -// - namespace JStudio { -struct data { - static u8 ga8cSignature[8]; -}; - -}; // namespace JStudio - -// -// Forward References: -// - -extern "C" u8 ga8cSignature__Q27JStudio4data[8]; - -// -// External References: -// - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 80455460-80455468 003A60 0008+00 0/0 1/1 0/0 .sdata2 ga8cSignature__Q27JStudio4data */ -SECTION_SDATA2 u8 JStudio::data::ga8cSignature[8] = { - 0x6A, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6F, 0x00, -}; +namespace data { +extern const char ga8cSignature[] = "jstudio"; +} // namespace data +} // namespace JStudio diff --git a/libs/JSystem/JStudio/JStudio/stb-data-parse.cpp b/libs/JSystem/JStudio/JStudio/stb-data-parse.cpp index bef8ceabdb9..eb5d1c45423 100644 --- a/libs/JSystem/JStudio/JStudio/stb-data-parse.cpp +++ b/libs/JSystem/JStudio/JStudio/stb-data-parse.cpp @@ -95,4 +95,4 @@ asm void TParse_TParagraph_data::getData(TParse_TParagraph_data::TData* param_0) } // namespace data } // namespace stb -} // namespace JStudio \ No newline at end of file +} // namespace JStudio diff --git a/libs/JSystem/JStudio/JStudio/stb-data.cpp b/libs/JSystem/JStudio/JStudio/stb-data.cpp index 79a90607216..8ea69d95d8d 100644 --- a/libs/JSystem/JStudio/JStudio/stb-data.cpp +++ b/libs/JSystem/JStudio/JStudio/stb-data.cpp @@ -1,23 +1,9 @@ -// -// Generated By: dol2asm -// Translation Unit: stb-data -// - -#include "JSystem/JStudio/JStudio/stb-data.h" -#include "dol2asm.h" #include "dolphin/types.h" - namespace JStudio { namespace stb { namespace data { - -const u8 gauDataSize_TEParagraph_data[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x40, -}; - -const u32 ga4cSignature = 'STB\0'; - +extern const s32 gauDataSize_TEParagraph_data[8] = {0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40}; +extern const char ga4cSignature[] = "STB"; } // namespace data } // namespace stb } // namespace JStudio diff --git a/libs/JSystem/JSupport/JSUList.cpp b/libs/JSystem/JSupport/JSUList.cpp index 7111ffd9b9a..2577679b30b 100644 --- a/libs/JSystem/JSupport/JSUList.cpp +++ b/libs/JSystem/JSupport/JSUList.cpp @@ -161,4 +161,4 @@ JSUPtrLink* JSUPtrList::getNthLink(u32 index) const { } return node; -} \ No newline at end of file +} diff --git a/libs/SSystem/SComponent/c_cc_d.cpp b/libs/SSystem/SComponent/c_cc_d.cpp index 2c9bf524749..0f237dffefd 100644 --- a/libs/SSystem/SComponent/c_cc_d.cpp +++ b/libs/SSystem/SComponent/c_cc_d.cpp @@ -772,4 +772,4 @@ void cCcD_ObjCo::SetIGrp(u32 grp) { void cCcD_ObjCo::SetVsGrp(u32 grp) { mSPrm &= ~0x70; mSPrm |= grp; -} \ No newline at end of file +}