Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
Uhh.. little Cleanup until I don't had motivation for that anymore. (#33
Browse files Browse the repository at this point in the history
)

* Don't do Nightly builds on cleanup branches!

* DS(i): indentation part 1.

* 3DS: indentation part 1.

* Switch: indentation part 1.

* get rid of old bad Textbox.
  • Loading branch information
SuperSaiyajinStackZ committed Oct 12, 2019
1 parent 5cef837 commit 57f5bf9
Show file tree
Hide file tree
Showing 131 changed files with 27,046 additions and 27,055 deletions.
1 change: 0 additions & 1 deletion 3ds/assets/gfx/credits.t3s
Expand Up @@ -2,7 +2,6 @@
credits/flame.png
credits/pk11.png
credits/rocketRobz.png
credits/textbox.png
credits/totallyNotGuy.png
credits/universal_credits.png
credits/voltZ.png
Binary file removed 3ds/assets/gfx/credits/textbox.png
Binary file not shown.
3 changes: 1 addition & 2 deletions 3ds/assets/gfx/sprites.t3s
Expand Up @@ -47,5 +47,4 @@ sprites/misc/actionBox2.png
sprites/misc/back.png
sprites/misc/cover_glow.png
sprites/misc/cover_normal.png
sprites/misc/frame.png
sprites/misc/helperBox.png
sprites/misc/frame.png
Binary file removed 3ds/assets/gfx/sprites/misc/helperBox.png
Binary file not shown.
9 changes: 1 addition & 8 deletions 3ds/include/C2D_helper.h
Expand Up @@ -16,11 +16,4 @@ struct ImageSize Draw_LoadImageFile(C2D_Image *texture, const char *path);
void GetImageSizeFile(const char *path, int *width, int *height);
bool Draw_LoadImageMemory(C2D_Image *texture, void *data, size_t size);

#endif

// bool Draw_Image(C2D_Image image, float x, float y);
// bool Draw_ImageScale(C2D_Image image, float x, float y, float scaleX, float scaleY);
// bool Draw_LoadImageFile(C2D_Image *texture, const char *path);
// bool Draw_LoadImageFileGIF(C2D_Image *texture, const char *path);
// bool Draw_LoadImageFilePCX(C2D_Image *texture, const char *path);
// bool Draw_LoadImageMemory(C2D_Image *texture, void *data, size_t size);
#endif
4 changes: 2 additions & 2 deletions 3ds/include/colors.hpp
Expand Up @@ -55,7 +55,7 @@
*/
#define RGB565_TO_RGBA8(rgb, a) \
(RGBA8(((rgb>>11)&0x1F)*0xFF/0x1F, ((rgb>>5)&0x3F)*0xFF/0x3F, (rgb&0x1F)*0xFF/0x1F, a&0xFF))

/**
* @brief Converts a RGB565 color to ABGR8 color (adds maximum alpha)
* @param rgb 565 to be converted
Expand Down Expand Up @@ -88,4 +88,4 @@
#define DIM RGBA8(0, 0, 0, 190)

typedef u32 Color;
#endif
#endif
6 changes: 3 additions & 3 deletions 3ds/include/ftp/ftp.h
Expand Up @@ -5,9 +5,9 @@
/*! Loop status */
typedef enum
{
LOOP_CONTINUE, /*!< Continue looping */
LOOP_RESTART, /*!< Reinitialize */
LOOP_EXIT, /*!< Terminate looping */
LOOP_CONTINUE, /*!< Continue looping */
LOOP_RESTART, /*!< Reinitialize */
LOOP_EXIT, /*!< Terminate looping */
} loop_status_t;

bool isTransfering;
Expand Down
94 changes: 47 additions & 47 deletions 3ds/include/gui.hpp
Expand Up @@ -52,67 +52,67 @@
#define FONT_SIZE_9 0.37f

namespace DateTime {
std::string timeStr(void);
std::string timeStr(void);
}

namespace Gui
{
Result init(void);
Result loadSheetsAndFont(void);
void exit(void);
Result init(void);
Result loadSheetsAndFont(void);
void exit(void);

void mainLoop(u32 hDown, u32 hHeld, touchPosition touch);
void setScreen(std::unique_ptr<SCREEN> screen);
void screenBack(void);

C3D_RenderTarget* target(gfxScreen_t t);

// Clear Text.
void clearTextBufs(void);
// Draw Sprites from the Sheets.
void sprite(int sheet, int key, int x, int y);
void Draw_ImageBlend(int sheet, int key, int x, int y, u32 color);

// Layouts!
void DrawBGTop(void);
void DrawBarsTop(void);
void DrawBGBot(void);
void DrawBarsBot(void);
void DrawBarsBottomBack(void);

// The animated Selectors.
void drawFileSelector(float x, float y);
void drawGUISelector(int key, float x, float y, float speed);

// New Text / String Functions.
void DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth = 400);
void DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth = 400);
void GetStringSize(float size, float *width, float *height, std::string Text);
float GetStringWidth(float size, std::string Text);
float GetStringHeight(float size, std::string Text);

void DrawFileBrowseBG(u32 color1 = C2D_Color32(127, 127, 127, 255), u32 color2 = C2D_Color32(195, 195, 195, 255), bool topDraw = true);
C3D_RenderTarget* target(gfxScreen_t t);

// Clear Text.
void clearTextBufs(void);

// Draw Sprites from the Sheets.
void sprite(int sheet, int key, int x, int y);
void Draw_ImageBlend(int sheet, int key, int x, int y, u32 color);

// Layouts!
void DrawBGTop(void);
void DrawBarsTop(void);
void DrawBGBot(void);
void DrawBarsBot(void);
void DrawBarsBottomBack(void);

// The animated Selectors.
void drawFileSelector(float x, float y);
void drawGUISelector(int key, float x, float y, float speed);

// New Text / String Functions.
void DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth = 400);
void DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth = 400);
void GetStringSize(float size, float *width, float *height, std::string Text);
float GetStringWidth(float size, std::string Text);
float GetStringHeight(float size, std::string Text);

void DrawFileBrowseBG(u32 color1 = C2D_Color32(127, 127, 127, 255), u32 color2 = C2D_Color32(195, 195, 195, 255), bool topDraw = true);
}

// Other Display stuff.
void DisplayMsg(std::string text);
void DisplayTime(void);
// Other Display stuff.
void DisplayMsg(std::string text);
void DisplayTime(void);

// Battery Draw (Top/Bottom Screen.)
void drawBatteryTop(void);
void drawBatteryBot(void);
// Battery Draw (Top/Bottom Screen.)
void drawBatteryTop(void);
void drawBatteryBot(void);

void displayBatteryNearlyToDead(void);
void displayBatteryNearlyToDead(void);

void set_screen(C3D_RenderTarget * screen);
void set_screen(C3D_RenderTarget * screen);

// Misc.
bool Draw_Rect(float x, float y, float w, float h, u32 color);
// Misc.
bool Draw_Rect(float x, float y, float w, float h, u32 color);

// Editor Draw.
void Draw_Text_Editor(float x, float y, float size, u32 color, const char *text);
void Draw_GetTextSizeEditor(float size, float *width, float *height, const char *text);
float Draw_GetTextWidthEditor(float size, const char *text);
// Editor Draw.
void Draw_Text_Editor(float x, float y, float size, u32 color, const char *text);
void Draw_GetTextSizeEditor(float size, float *width, float *height, const char *text);
float Draw_GetTextWidthEditor(float size, const char *text);

#endif
#endif
2 changes: 1 addition & 1 deletion 3ds/include/music/all.h
Expand Up @@ -10,4 +10,4 @@
err, strerror(errno)); } while (0)

#define delete(ptr) \
free((void*) ptr); ptr = NULL
free((void*) ptr); ptr = NULL
2 changes: 1 addition & 1 deletion 3ds/include/music/error.h
Expand Up @@ -33,4 +33,4 @@ struct errInfo_t
*/
char* ctrmus_strerror(int err);

#endif
#endif
2 changes: 1 addition & 1 deletion 3ds/include/music/file.h
Expand Up @@ -22,4 +22,4 @@ const char* fileToStr(enum file_types ft);
* \param file File location.
* \return file_types enum or 0 on error and errno set.
*/
enum file_types getFileType(const char *file);
enum file_types getFileType(const char *file);
2 changes: 1 addition & 1 deletion 3ds/include/music/flac.h
Expand Up @@ -48,4 +48,4 @@ void exitFlac(void);
* \param in Input file.
* \return 0 if Flac file, else not or failure.
*/
int isFlac(const char* in);
int isFlac(const char* in);
2 changes: 1 addition & 1 deletion 3ds/include/music/mp3.h
Expand Up @@ -46,4 +46,4 @@ u64 MP3_GetLength(void);
/**
* Free MP3 decoder.
*/
void exitMp3(void);
void exitMp3(void);
2 changes: 1 addition & 1 deletion 3ds/include/music/opus.h
Expand Up @@ -18,4 +18,4 @@ int playOpus(const char* in);

uint64_t fillOpusBuffer(int16_t* bufferOut);

int isOpus(const char* in);
int isOpus(const char* in);
12 changes: 6 additions & 6 deletions 3ds/include/music/playback.h
Expand Up @@ -9,10 +9,10 @@

typedef struct {
bool has_meta;
char title[31];
char album[31];
char artist[31];
char year[5];
char title[31];
char album[31];
char artist[31];
char year[5];
} Audio_Metadata;

extern Audio_Metadata metadata;
Expand Down Expand Up @@ -52,7 +52,7 @@ bool isPlaying(void);

/**
* Returns whether music is playing or paused.
*
*
* \return True if paused.
*/
bool isPaused(void);
Expand Down Expand Up @@ -81,4 +81,4 @@ u64 Audio_GetPosition(void);

int Audio_GetRate(void);

#endif
#endif
2 changes: 1 addition & 1 deletion 3ds/include/music/vorbis.h
Expand Up @@ -19,4 +19,4 @@ int playVorbis(const char* in);

uint64_t fillVorbisBuffer(char* bufferOut);

int isVorbis(const char* in);
int isVorbis(const char* in);
2 changes: 1 addition & 1 deletion 3ds/include/music/wav.h
Expand Up @@ -42,4 +42,4 @@ uint64_t readWav(void* buffer);
/**
* Free Wav file.
*/
void exitWav(void);
void exitWav(void);
2 changes: 1 addition & 1 deletion 3ds/include/screens/buttonTester.hpp
Expand Up @@ -29,7 +29,7 @@

#include <vector>

class ButtonTester : public SCREEN
class ButtonTester : public SCREEN
{
public:
void Draw(void) const override;
Expand Down
9 changes: 4 additions & 5 deletions 3ds/include/screens/calculatorScreen.hpp
Expand Up @@ -29,15 +29,15 @@

#include <array>

class Calculator : public SCREEN
class Calculator : public SCREEN
{
public:
void Draw(void) const override;
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;

private:
char op; // The operation like '-' '+' '*' '/'.
float num1, num2; // The Numbers like '1' '5' or whatever.
char op; // The operation like '-' '+' '*' '/'.
float num1, num2; // The Numbers like '1' '5' or whatever.
std::string display = "Not Implemented yet."; // Display the Values and stuff.

// Functions.
Expand Down Expand Up @@ -69,6 +69,5 @@ class Calculator : public SCREEN
{"E", 290, 40},
{"B", 290, 90},
{"C", 290, 140}
}
};
}};
};
4 changes: 2 additions & 2 deletions 3ds/include/screens/calendarScreen.hpp
Expand Up @@ -33,7 +33,7 @@
#include <vector>

// CALENDAR
class Calendar : public SCREEN
class Calendar : public SCREEN
{
public:
void Draw(void) const override;
Expand Down Expand Up @@ -76,4 +76,4 @@ class Calendar : public SCREEN
void displayDays(void) const;
void displayMonthYear(void) const;
void drawWeekDays(void) const;
};
};
12 changes: 6 additions & 6 deletions 3ds/include/screens/creditsScreen.hpp
Expand Up @@ -30,14 +30,14 @@
#include <string>
#include <vector>

class Credits : public SCREEN
class Credits : public SCREEN
{
public:
void Draw(void) const override;
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;

private:
int dialog = 5;
int dialog = 5;

std::vector<std::string> names = {
"VoltZ",
Expand All @@ -49,15 +49,15 @@ class Credits : public SCREEN
};

std::vector<Structs::ButtonPos> creditsButtonPos = {
{0, 25, 149, 52, -1},
{160, 25, 149, 52, -1},
{0, 25, 149, 52, -1},
{160, 25, 149, 52, -1},
{0, 90, 149, 52, -1},
{160, 90, 149, 52, -1},
{0, 150, 149, 52, -1},
{160, 150, 149, 52, -1},
{160, 150, 149, 52, -1},
};

void drawCreditsDialogs(void) const;
void drawCredits(void) const;
void drawButtons(void) const;
};
};
2 changes: 1 addition & 1 deletion 3ds/include/screens/fileManagerScreen.hpp
Expand Up @@ -45,7 +45,7 @@ extern "C" {
#include "cia.h"
}

class FileManager : public SCREEN
class FileManager : public SCREEN
{
public:
void Draw(void) const override;
Expand Down
2 changes: 1 addition & 1 deletion 3ds/include/screens/ftpScreen.hpp
Expand Up @@ -26,7 +26,7 @@

#include "screens/screen.hpp"

class FTP : public SCREEN
class FTP : public SCREEN
{
public:
void Draw(void) const override;
Expand Down
4 changes: 2 additions & 2 deletions 3ds/include/screens/gameSubMenu.hpp
Expand Up @@ -29,7 +29,7 @@

#include <vector>

class GameSub : public SCREEN
class GameSub : public SCREEN
{
public:
void Draw(void) const override;
Expand All @@ -43,7 +43,7 @@ class GameSub : public SCREEN

std::vector<Structs::ButtonPos> gamesSubMenuButtonPos = {
// Pong. :P
{1, 40, 149, 52, -1},
{1, 40, 149, 52, -1},
// Tic-Tac-Toe. ;P
{162, 40, 149, 52, -1},
// Back Icon.
Expand Down

0 comments on commit 57f5bf9

Please sign in to comment.