Cleanup Includes/Add PushMessage(string, string)

This commit is contained in:
tobid7 2024-05-17 11:33:09 +02:00
parent e0c03f2ec5
commit f3291963d4
23 changed files with 35 additions and 66 deletions

View File

@ -2,17 +2,13 @@
#include <unistd.h>
#include <cstring>
#include <functional>
#include <memory>
#include <regex>
#include <sstream>
#include <string>
#define UNPACK_RGBA(col) (uint8_t)(col >> 24), (col >> 16), (col >> 8), (col)
#define UNPACK_BGRA(col) (uint8_t)(col >> 8), (col >> 16), (col >> 24), (col)
inline uint32_t RGBA8(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) {
#define ISIMPLEPAK(x, y) (((x)&0xff) << y)
#define ISIMPLEPAK(x, y) (((x) & 0xff) << y)
return (ISIMPLEPAK(r, 0) | ISIMPLEPAK(g, 8) | ISIMPLEPAK(b, 16) |
ISIMPLEPAK(a, 24));
}

View File

@ -6,7 +6,6 @@
#include <renderd7/Image.hpp>
#include <renderd7/R7Vec.hpp>
#include <renderd7/font.hpp>
#include <string>
#define MAKEFLAG(x) (1 << x)

View File

@ -1,10 +1,7 @@
#pragma once
// Base includes
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <vector>
// 3ds does not support std::chrono
#include <3ds.h>

View File

@ -1,7 +1,6 @@
#pragma once
#include <cstdint>
#include <memory>
#include <cstddef>
namespace RenderD7 {
namespace Memory {

View File

@ -17,6 +17,9 @@ struct Message {
void ProcessMessages();
void PushMessage(const Message& msg);
inline void PushMessage(const std::string& head, const std::string& msg) {
PushMessage(Message(head, msg));
}
// Config
void SetMessageIdleStartFrame(int frame);
void SetMessageTotalAnimationFrames(int total_frames);

View File

@ -1,4 +1,5 @@
#pragma once
#include <map>
#include <memory>
namespace RenderD7 {

View File

@ -1,11 +1,6 @@
#pragma once
#include <3ds.h>
#include <cstdint>
#include <functional>
#include <string>
#include <vector>
namespace RenderD7 {
namespace Init {
void Security();

View File

@ -1,8 +1,6 @@
#pragma once
#include <3ds.h>
#include <vector>
namespace RenderD7 {
namespace Tasks {
/// @brief Push A Task

View File

@ -1,11 +1,7 @@
#pragma once
#include <algorithm>
#include <functional>
#include <renderd7/DrawV2.hpp>
#include <renderd7/R7Vec.hpp>
#include <string>
#include <vector>
// UI7: The new RenderD7 UI Standart based on
// Draw2 (based on Citro2D)

View File

@ -4,7 +4,6 @@
#include <fstream>
#include <renderd7/Error.hpp>
#include <string>
namespace RenderD7 {
class Font {

View File

@ -1,9 +1,7 @@
#pragma once
#include <stdarg.h>
#include <time.h>
#include <unistd.h>
#include <fstream>
#include <string>
/// @brief Log Class

View File

@ -1,7 +1,7 @@
#pragma once
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>
#define NPI_NIMG_ (uint32_t)0x4e494d47 // Magic: NIMG

View File

@ -1,18 +1,10 @@
#pragma once
/// c++ Includes
#include <algorithm>
#include <codecvt>
#include <cstring>
#include <filesystem>
#include <functional>
#include <iostream>
#include <locale>
#include <map>
#include <memory>
#include <random>
#include <stack>
#include <string>
#include <vector>
/// c includes
#include <dirent.h>
#include <stdio.h>

View File

@ -4,7 +4,6 @@
#include <atomic>
#include <functional>
#include <renderd7/parameter.hpp>
#include <string>
using CTRU_Thread = Thread;

View File

@ -1,6 +1,5 @@
#include <citro2d.h>
#include <algorithm>
#include <renderd7/DrawV2.hpp>
#include <renderd7/global_db.hpp>
#include <renderd7/internal_db.hpp>

View File

@ -8,7 +8,6 @@
// Debugging
#include <algorithm>
#include <filesystem>
#include <memory>
#include <renderd7/stringtool.hpp>
bool ___dir__predicate__(const RenderD7::FileSystem::Entry &lhs,

View File

@ -3,6 +3,7 @@
#include <string.h>
#include <renderd7/Tasks.hpp>
#include <vector>
static std::vector<Thread> threads;

View File

@ -4,7 +4,6 @@
#include <time.h>
#include <unistd.h>
#include <fstream>
#include <memory>
#include <renderd7/Time.hpp>
#include <string>

View File

@ -1,5 +1,4 @@
#include <arpa/inet.h>
#include <errno.h>
#include <malloc.h>
#include <stdarg.h>
#include <stdio.h>
@ -7,7 +6,6 @@
#include <string.h>
#include <unistd.h>
#include <filesystem>
#include <renderd7/FileSystem.hpp>
#include <renderd7/external/json.hpp>
#include <renderd7/renderd7.hpp>

View File

@ -1,15 +1,13 @@
#include <filesystem>
#include <fstream>
#include <map>
#include <iostream>
#include <renderd7/nimg.hpp>
#include <sstream>
// Use an Npi simplifier cause I am lazy
#define reca_cc(x) reinterpret_cast<const char*>(x)
#define reca_c(x) reinterpret_cast<char*>(x)
#define pak32(q, w, e, r) \
((((q)&0xff) << 0) | (((w)&0xff) << 8) | (((e)&0xff) << 16) | \
(((r)&0xff) << 24))
#define pak32(q, w, e, r) \
((((q) & 0xff) << 0) | (((w) & 0xff) << 8) | (((e) & 0xff) << 16) | \
(((r) & 0xff) << 24))
// Stupid RLE Algorithm
void npi_compress(std::vector<unsigned char>& ret,

View File

@ -1,4 +1,3 @@
#include <regex>
#include <renderd7/DrawV2.hpp> // Switch to Draw2
#include <renderd7/Hid.hpp> // Integate HidApi
#include <renderd7/Message.hpp>
@ -12,6 +11,10 @@
#include <renderd7/external/json.hpp>
#include <renderd7/internal_db.hpp>
// C++ includes
#include <filesystem>
#include <random>
static void RD7i_ExitHook() {
C2D_TextBufDelete(rd7i_text_buffer);
C2D_TextBufDelete(rd7i_d2_dimbuf);
@ -599,10 +602,10 @@ void RenderD7::RSettings::Draw(void) const {
// List Bg
for (int i = 0; i < 12; i++) {
if ((i % 2 == 0))
RenderD7::Draw2::RFS(R7Vec2(0, 40 + (i)*15), R7Vec2(400, 15),
RenderD7::Draw2::RFS(R7Vec2(0, 40 + (i) * 15), R7Vec2(400, 15),
RenderD7::StyleColor(RD7Color_List0));
else
RenderD7::Draw2::RFS(R7Vec2(0, 40 + (i)*15), R7Vec2(400, 15),
RenderD7::Draw2::RFS(R7Vec2(0, 40 + (i) * 15), R7Vec2(400, 15),
RenderD7::StyleColor(RD7Color_List1));
}