Skip to content

Commit

Permalink
More missing header guards + make personals constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
piepie62 committed Oct 31, 2019
1 parent ad283be commit bbf4251
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 12 deletions.
5 changes: 5 additions & 0 deletions 3ds/include/appIcon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
* reasonable ways as different from the original version.
*/

#ifndef APPICON_HPP
#define APPICON_HPP

// clang-format off
constexpr inline std::array<std::array<u8, 144>, 48> bootSplash = {{
{0x88,0x44,0x23,0x85,0x43,0x22,0x80,0x41,0x21,0x82,0x41,0x21,0x87,0x44,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0xBE,0x7C,0x5B,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0xBE,0x7C,0x5B,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23},
Expand Down Expand Up @@ -75,3 +78,5 @@ constexpr inline std::array<std::array<u8, 144>, 48> bootSplash = {{
{0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0xBE,0x7C,0x5B,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0xBE,0x7C,0x5B,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23},
{0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0xBE,0x7C,0x5B,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0xBE,0x7C,0x5B,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23,0x89,0x45,0x23}}};
// clang-format on

#endif
9 changes: 7 additions & 2 deletions common/include/picoc/pksm_random.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@
* reasonable ways as different from the original version.
*/

void PKSM_Rand(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs);
void PKSM_Srand(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs);
#ifndef PKSM_RANDOM_H
#define PKSM_RANDOM_H

void PKSM_Rand(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs);
void PKSM_Srand(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs);

#endif
5 changes: 5 additions & 0 deletions common/include/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@
* reasonable ways as different from the original version.
*/

#ifndef PLATFORM_H
#define PLATFORM_H

#ifdef _3DS
#include <3ds.h>
#endif
#ifdef __SWITCH__
#include <switch.h>
#endif

#endif
5 changes: 5 additions & 0 deletions common/include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@
* reasonable ways as different from the original version.
*/

#ifndef TYPES_H
#define TYPES_H

#ifdef _3DS
#include <3ds/types.h>
#endif
#ifdef __SWITCH__
#include <switch/types.h>
#endif

#endif
9 changes: 7 additions & 2 deletions core/include/personal/personal_bwb2w2.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const char personal_bwb2w2[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x31,
#ifndef PERSONAL_BWB2W2_H
#define PERSONAL_BWB2W2_H

constexpr char personal_bwb2w2[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x31,
0x31, 0x2d, 0x41, 0x41, 0x0b, 0x03, 0x1f, 0x46, 0x03, 0x41, 0x41, 0x22, 0x00, 0x00, 0x01, 0x3c, 0x3e, 0x3f, 0x3c, 0x50, 0x50, 0x0b, 0x03, 0x1f,
0x46, 0x03, 0x41, 0x41, 0x22, 0x00, 0x00, 0x01, 0x50, 0x52, 0x53, 0x50, 0x64, 0x64, 0x0b, 0x03, 0x1f, 0x46, 0x03, 0x41, 0x41, 0x22, 0x00, 0x00,
0x01, 0x27, 0x34, 0x2b, 0x41, 0x3c, 0x32, 0x09, 0x09, 0x1f, 0x46, 0x03, 0x42, 0x42, 0x5e, 0x00, 0x00, 0x01, 0x3a, 0x40, 0x3a, 0x50, 0x50, 0x41,
Expand Down Expand Up @@ -501,4 +504,6 @@ const char personal_bwb2w2[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x05, 0x9a, 0x9a, 0x9a, 0x00, 0x00, 0x02, 0x4f, 0x64, 0x50, 0x79, 0x6e, 0x5a, 0x02, 0x02, 0x00, 0x5a, 0x05, 0x90, 0x90, 0x90, 0x00, 0x00, 0x02,
0x4f, 0x69, 0x46, 0x65, 0x91, 0x50, 0x0c, 0x02, 0x00, 0x5a, 0x05, 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x02, 0x59, 0x91, 0x5a, 0x5b, 0x69, 0x50, 0x04,
0x02, 0x00, 0x5a, 0x05, 0x16, 0x16, 0x16, 0x00, 0x00, 0x02};
const int personal_bwb2w2_size = 12053;
constexpr int personal_bwb2w2_size = 12053;

#endif
9 changes: 7 additions & 2 deletions core/include/personal/personal_dppthgss.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const char personal_dppthgss[] = {
#ifndef PERSONAL_DPPTHGSS_H
#define PERSONAL_DPPTHGSS_H

constexpr char personal_dppthgss[] = {
0x00,
0x00,
0x00,
Expand Down Expand Up @@ -8128,4 +8131,6 @@ const char personal_dppthgss[] = {
0x00,
0x06,
};
const int personal_dppthgss_size = 8128;
constexpr int personal_dppthgss_size = 8128;

#endif
9 changes: 7 additions & 2 deletions core/include/personal/personal_lgpe.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const char personal_lgpe[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x31, 0x31,
#ifndef PERSONAL_LGPE
#define PERSONAL_LGPE

constexpr char personal_lgpe[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x31, 0x31,
0x2d, 0x41, 0x41, 0x0b, 0x03, 0x1f, 0x46, 0x03, 0x41, 0x41, 0x22, 0x00, 0x00, 0x01, 0x3c, 0x3e, 0x3f, 0x3c, 0x50, 0x50, 0x0b, 0x03, 0x1f, 0x46,
0x03, 0x41, 0x41, 0x22, 0x00, 0x00, 0x01, 0x50, 0x52, 0x53, 0x50, 0x64, 0x64, 0x0b, 0x03, 0x1f, 0x46, 0x03, 0x41, 0x41, 0x22, 0x52, 0x03, 0x02,
0x27, 0x34, 0x2b, 0x41, 0x3c, 0x32, 0x09, 0x09, 0x1f, 0x46, 0x03, 0x42, 0x42, 0x5e, 0x00, 0x00, 0x01, 0x3a, 0x40, 0x3a, 0x50, 0x50, 0x41, 0x09,
Expand Down Expand Up @@ -693,4 +696,6 @@ const char personal_lgpe[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x
0x1f, 0x05, 0xd0, 0x03, 0x02, 0x3c, 0x37, 0x3c, 0x7c, 0x5f, 0x46, 0x06, 0x11, 0x7f, 0x46, 0x00, 0x76, 0x13, 0xaf, 0xd1, 0x03, 0x02, 0x2d, 0x41,
0x28, 0x3c, 0x1e, 0x28, 0x05, 0x05, 0x7f, 0x46, 0x00, 0x14, 0x14, 0x14, 0xd2, 0x03, 0x02, 0x41, 0x4b, 0x46, 0x4b, 0x41, 0x55, 0x00, 0x00, 0x1f,
0x46, 0x03, 0x32, 0x5b, 0x6b, 0xd3, 0x03, 0x02};
const int personal_lgpe_size = 16660;
constexpr int personal_lgpe_size = 16660;

#endif
9 changes: 7 additions & 2 deletions core/include/personal/personal_smusum.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const char personal_smusum[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x31,
#ifndef PERSONAL_SMUSUM_H
#define PERSONAL_SMUSUM_H

constexpr char personal_smusum[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x31,
0x31, 0x2d, 0x41, 0x41, 0x0b, 0x03, 0x1f, 0x46, 0x03, 0x41, 0x41, 0x22, 0x00, 0x00, 0x01, 0x3c, 0x3e, 0x3f, 0x3c, 0x50, 0x50, 0x0b, 0x03, 0x1f,
0x46, 0x03, 0x41, 0x41, 0x22, 0x00, 0x00, 0x01, 0x50, 0x52, 0x53, 0x50, 0x64, 0x64, 0x0b, 0x03, 0x1f, 0x46, 0x03, 0x41, 0x41, 0x22, 0x50, 0x03,
0x02, 0x27, 0x34, 0x2b, 0x41, 0x3c, 0x32, 0x09, 0x09, 0x1f, 0x46, 0x03, 0x42, 0x42, 0x5e, 0x00, 0x00, 0x01, 0x3a, 0x40, 0x3a, 0x50, 0x50, 0x41,
Expand Down Expand Up @@ -690,4 +693,6 @@ const char personal_smusum[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0
0x06, 0x7f, 0x46, 0x00, 0xc7, 0xc7, 0x0b, 0xcc, 0x03, 0x02, 0x41, 0x62, 0x3f, 0x60, 0x28, 0x49, 0x0c, 0x08, 0x7f, 0x46, 0x00, 0xa0, 0x1f, 0x05,
0xcd, 0x03, 0x02, 0x3c, 0x37, 0x3c, 0x7c, 0x5f, 0x46, 0x06, 0x11, 0x7f, 0x46, 0x00, 0x76, 0x13, 0xaf, 0xce, 0x03, 0x02, 0x2d, 0x41, 0x28, 0x3c,
0x1e, 0x28, 0x05, 0x05, 0x7f, 0x46, 0x00, 0x14, 0x14, 0x14, 0xcf, 0x03, 0x02};
const int personal_smususm_size = 16592;
constexpr int personal_smususm_size = 16592;

#endif
9 changes: 7 additions & 2 deletions core/include/personal/personal_xyoras.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const char personal_xyoras[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x31,
#ifndef PERSONAL_XYORAS_H
#define PERSONAL_XYORAS_H

constexpr char personal_xyoras[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x31,
0x31, 0x2d, 0x41, 0x41, 0x0b, 0x03, 0x1f, 0x46, 0x03, 0x41, 0x41, 0x22, 0x00, 0x00, 0x01, 0x3c, 0x3e, 0x3f, 0x3c, 0x50, 0x50, 0x0b, 0x03, 0x1f,
0x46, 0x03, 0x41, 0x41, 0x22, 0x00, 0x00, 0x01, 0x50, 0x52, 0x53, 0x50, 0x64, 0x64, 0x0b, 0x03, 0x1f, 0x46, 0x03, 0x41, 0x41, 0x22, 0xf8, 0x02,
0x02, 0x27, 0x34, 0x2b, 0x41, 0x3c, 0x32, 0x09, 0x09, 0x1f, 0x46, 0x03, 0x42, 0x42, 0x5e, 0x00, 0x00, 0x01, 0x3a, 0x40, 0x3a, 0x50, 0x50, 0x41,
Expand Down Expand Up @@ -584,4 +587,6 @@ const char personal_xyoras[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x7d, 0x00, 0x00, 0x02, 0x41, 0x88, 0x5e, 0x87, 0x36, 0x60, 0x00, 0x01, 0x7f, 0x8c, 0x00, 0x71, 0x71, 0x71, 0x00, 0x00, 0x02, 0x5f, 0x91, 0x82,
0x78, 0x78, 0x5a, 0x0f, 0x02, 0x7f, 0x23, 0x05, 0xb8, 0xb8, 0xb8, 0x00, 0x00, 0x02, 0x41, 0x96, 0x28, 0x91, 0x0f, 0x50, 0x06, 0x03, 0x7f, 0x46,
0x00, 0x5b, 0x5b, 0x5b, 0x00, 0x00, 0x02};
const int personal_xyoras_size = 14042;
constexpr int personal_xyoras_size = 14042;

#endif

0 comments on commit bbf4251

Please sign in to comment.