mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
Cria arquivo de implementações
This commit is contained in:
parent
d35b564ddd
commit
7af70b394f
@ -8,6 +8,7 @@
|
||||
#include "common/numerics.hpp"
|
||||
#include "graphics/sprite.hpp"
|
||||
#include "graphics/viewport.hpp"
|
||||
#include "platform-dx/implementations.hpp"
|
||||
|
||||
using DxSpriteBatch = DirectX::SpriteBatch;
|
||||
using DxSpriteSortMode = DirectX::SpriteSortMode;
|
||||
@ -20,10 +21,6 @@ using DirectX::GXMVECTOR;
|
||||
using DxSpriteFont = DirectX::SpriteFont;
|
||||
|
||||
namespace xna {
|
||||
struct SpriteFont::PlatformImplementation {
|
||||
sptr<DirectX::SpriteFont> _dxSpriteFont = nullptr;
|
||||
};
|
||||
|
||||
SpriteFont::SpriteFont(GraphicsDevice& device, String const& fontFileName)
|
||||
{
|
||||
const auto wString = XnaHToWString(fontFileName);
|
||||
@ -44,11 +41,7 @@ namespace xna {
|
||||
vec2.Y = size.m128_f32[1];
|
||||
|
||||
return vec2;
|
||||
}
|
||||
|
||||
struct SpriteBatch::PlatformImplementation {
|
||||
sptr<DirectX::SpriteBatch> _dxspriteBatch = nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
static constexpr void ConvertSpriteSort(SpriteSortMode value, DirectX::SpriteSortMode& target) {
|
||||
target = static_cast<DirectX::SpriteSortMode>(static_cast<int>(value));
|
||||
|
@ -35,7 +35,7 @@ namespace xna {
|
||||
void DrawString(SpriteFont& spriteFont, String const& text, Vector2 const& position, Color const& color,
|
||||
float rotation, Vector2 const& origin, float scale, SpriteEffects effects, float layerDepth);
|
||||
|
||||
private:
|
||||
public:
|
||||
struct PlatformImplementation;
|
||||
uptr<PlatformImplementation> implementation = nullptr;
|
||||
};
|
||||
@ -46,7 +46,7 @@ namespace xna {
|
||||
~SpriteFont();
|
||||
Vector2 MeasureString(String const& text, bool ignoreWhiteSpace = true);
|
||||
|
||||
private:
|
||||
public:
|
||||
struct PlatformImplementation;
|
||||
uptr<PlatformImplementation> implementation = nullptr;
|
||||
};
|
||||
|
18
inc/platform-dx/implementations.hpp
Normal file
18
inc/platform-dx/implementations.hpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "graphics/sprite.hpp"
|
||||
#include "graphics/device.hpp"
|
||||
#include "platform-dx/adapter-dx.hpp"
|
||||
#include "platform-dx/presentparameters-dx.hpp"
|
||||
#include "dxheaders.hpp"
|
||||
#include "platform-dx/swapchain-dx.hpp"
|
||||
#include "platform-dx/rendertarget-dx.hpp"
|
||||
#include "platform-dx/blendstate-dx.hpp"
|
||||
|
||||
namespace xna {
|
||||
struct SpriteFont::PlatformImplementation {
|
||||
sptr<DirectX::SpriteFont> _dxSpriteFont = nullptr;
|
||||
};
|
||||
|
||||
struct SpriteBatch::PlatformImplementation {
|
||||
sptr<DirectX::SpriteBatch> _dxspriteBatch = nullptr;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user