Cleanup Includes/Add PushMessage(string, string)
This commit is contained in:
@ -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));
|
||||
}
|
||||
@ -165,4 +161,4 @@ std::string RGB2Hex(int r, int g, int b);
|
||||
/// @return Color32
|
||||
uint32_t Hex(const std::string &color, uint8_t a = 255);
|
||||
} // namespace Color
|
||||
} // namespace RenderD7
|
||||
} // namespace RenderD7
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include <renderd7/Image.hpp>
|
||||
#include <renderd7/R7Vec.hpp>
|
||||
#include <renderd7/font.hpp>
|
||||
#include <string>
|
||||
|
||||
#define MAKEFLAG(x) (1 << x)
|
||||
|
||||
@ -51,4 +50,4 @@ void Text(R7Vec2 pos, const std::string& text, RD7TextFlags flags = 0);
|
||||
void Image(RenderD7::Image* img, const R7Vec2& pos = R7Vec2(0, 0),
|
||||
const R7Vec2& scale = R7Vec2(1, 1));
|
||||
} // namespace Draw2
|
||||
} // namespace RenderD7
|
||||
} // namespace RenderD7
|
||||
|
@ -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>
|
||||
|
||||
@ -50,4 +47,4 @@ inline void End(std::string group, std::string func_name) {
|
||||
rd7_traces[trace_id].time_start / (float)TICKS_PER_MSEC);
|
||||
}
|
||||
} // namespace Ftrace
|
||||
} // namespace RenderD7
|
||||
} // namespace RenderD7
|
||||
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <cstddef>
|
||||
|
||||
namespace RenderD7 {
|
||||
namespace Memory {
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace RenderD7 {
|
||||
@ -24,4 +25,4 @@ class Ovl {
|
||||
/// @brief Add an Overlay to the Screen
|
||||
/// @param scene Overlay to push to Screen
|
||||
void AddOvl(std::unique_ptr<RenderD7::Ovl> scene);
|
||||
} // namespace RenderD7
|
||||
} // namespace RenderD7
|
||||
|
@ -1,11 +1,6 @@
|
||||
#pragma once
|
||||
#include <3ds.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace RenderD7 {
|
||||
namespace Init {
|
||||
void Security();
|
||||
@ -53,4 +48,4 @@ class Security {
|
||||
} // namespace RenderD7
|
||||
|
||||
/// @brief RenderD7 Security Object
|
||||
extern RenderD7::Security *rd7_security;
|
||||
extern RenderD7::Security *rd7_security;
|
||||
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
#include <3ds.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace RenderD7 {
|
||||
namespace Tasks {
|
||||
/// @brief Push A Task
|
||||
@ -11,4 +9,4 @@ void create(ThreadFunc entrypoint);
|
||||
/// @brief Destroy all Tasks
|
||||
void destroy(void);
|
||||
} // namespace Tasks
|
||||
} // namespace RenderD7
|
||||
} // namespace RenderD7
|
||||
|
@ -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)
|
||||
@ -56,4 +52,4 @@ R7Vec2 GetCursorPos();
|
||||
void SetCursorPos(R7Vec2 cp);
|
||||
void RestoreCursor();
|
||||
void SameLine();
|
||||
} // namespace UI7
|
||||
} // namespace UI7
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <renderd7/Error.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace RenderD7 {
|
||||
class Font {
|
||||
@ -30,4 +29,4 @@ class Font {
|
||||
private:
|
||||
C2D_Font fnt = nullptr;
|
||||
};
|
||||
} // namespace RenderD7
|
||||
} // namespace RenderD7
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
/// @brief Log Class
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#define NPI_NIMG_ (uint32_t)0x4e494d47 // Magic: NIMG
|
||||
@ -27,4 +27,4 @@ struct nimg {
|
||||
nimg NIMG_Load(std::string path);
|
||||
nimg NIMG_LoadFromMem(unsigned char* buffer, size_t bf_size);
|
||||
void NIMG_Save(nimg image, std::string path);
|
||||
} // namespace RenderD7
|
||||
} // namespace RenderD7
|
||||
|
@ -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>
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
#include <renderd7/parameter.hpp>
|
||||
#include <string>
|
||||
|
||||
using CTRU_Thread = Thread;
|
||||
|
||||
|
Reference in New Issue
Block a user