Changes:
Remove ScreenApi Add Sprite And Image to R2 Add Image to UI7DrawList
This commit is contained in:
@ -21,7 +21,9 @@
|
||||
#include <map>
|
||||
#include <renderd7/Color.hpp>
|
||||
#include <renderd7/Font.hpp>
|
||||
#include <renderd7/Image.hpp>
|
||||
#include <renderd7/R7Vec.hpp>
|
||||
#include <renderd7/Sprite.hpp>
|
||||
#include <renderd7/smart_ctor.hpp>
|
||||
|
||||
#define MAKEFLAG(x) (1 << x)
|
||||
@ -53,7 +55,10 @@ class R2Base {
|
||||
R7Vec2 ap; //< Additional Pos
|
||||
unsigned int clr; //< Color
|
||||
bool Screen; //< TopScreen
|
||||
// 0 = skip, 1 = rect, 2 = tri, 3 = text, 4 = image
|
||||
Image::Ref img; //< Image Reference
|
||||
Sprite::Ref spr; //< Sprite Reference
|
||||
// 0 = skip, 1 = rect, 2 = tri, 3 = text,
|
||||
// 4 = image, 5 = sprite
|
||||
int type; //< Command Type
|
||||
bool lined = false; //< Draw Lined Rect/Tri
|
||||
// Text Specific
|
||||
@ -88,6 +93,8 @@ class R2Base {
|
||||
RD7TextFlags flags = 0, R7Vec2 tmb = R7Vec2());
|
||||
void AddText(R7Vec2 pos, const std::string& text, unsigned int clr,
|
||||
RD7TextFlags flags = 0, R7Vec2 tmb = R7Vec2());
|
||||
void AddImage(R7Vec2 pos, Image::Ref img);
|
||||
void AddSprite(Sprite::Ref spr);
|
||||
|
||||
private:
|
||||
const float default_text_size = 0.5f;
|
||||
|
@ -1,34 +0,0 @@
|
||||
/**
|
||||
* This file is part of RenderD7
|
||||
* Copyright (C) 2021-2024 NPI-D7, tobid7
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <citro2d.h>
|
||||
#include <citro3d.h>
|
||||
|
||||
/// \param Top Tob-Screen Target
|
||||
extern C3D_RenderTarget *Top;
|
||||
/// \param TopRight Top-Right-Screen Target (Never atually used)
|
||||
extern C3D_RenderTarget *TopRight;
|
||||
/// \param Bottom Bottom-Screen Target
|
||||
extern C3D_RenderTarget *Bottom;
|
||||
|
||||
namespace RenderD7 {
|
||||
/// @brief Begin Drawing On Specific Screen
|
||||
/// @param target The Screen Target (Top, Bottom or TopTight)
|
||||
void OnScreen(C3D_RenderTarget *target);
|
||||
} // namespace RenderD7
|
@ -51,6 +51,7 @@ class UI7DrawList {
|
||||
RD7TextFlags flags = 0, R7Vec2 box = R7Vec2());
|
||||
void AddText(R7Vec2 pos, const std::string &text, unsigned int clr,
|
||||
RD7TextFlags flags = 0, R7Vec2 box = R7Vec2());
|
||||
void AddImage(R7Vec2 pos, RenderD7::Image::Ref img);
|
||||
void AddCall(std::shared_ptr<DrawCmd> cmd);
|
||||
|
||||
void Process(bool auto_clear = true);
|
||||
|
@ -36,11 +36,6 @@ extern u32 d7_hUp;
|
||||
extern u32 d7_hRepeat; // Inofficial lol
|
||||
extern touchPosition d7_touch;
|
||||
|
||||
// Outdated Screens
|
||||
extern C3D_RenderTarget *Top;
|
||||
extern C3D_RenderTarget *TopRight;
|
||||
extern C3D_RenderTarget *Bottom;
|
||||
|
||||
// Modern Global Api
|
||||
extern int rd7_max_objects;
|
||||
extern bool rd7_do_splash;
|
||||
|
@ -57,7 +57,6 @@ extern bool rd7i_mt_screen;
|
||||
extern float rd7i_mt_txtSize;
|
||||
extern bool rd7i_metrikd;
|
||||
extern bool rd7i_ftraced;
|
||||
extern bool rd7i_current_screen;
|
||||
extern u64 rd7i_delta_time;
|
||||
extern u64 rd7i_last_tm;
|
||||
extern float rd7i_dtm;
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include <renderd7/Ovl.hpp>
|
||||
#include <renderd7/Render2.hpp>
|
||||
#include <renderd7/ResultDecoder.hpp>
|
||||
#include <renderd7/Screen.hpp>
|
||||
#include <renderd7/Sheet.hpp>
|
||||
#include <renderd7/Sprite.hpp>
|
||||
#include <renderd7/SpriteAnimation.hpp>
|
||||
|
Reference in New Issue
Block a user