blob: 51569e9a8d5330c74915196726eef51d532e7faa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#import "nes/common/display.hh"
#import <SpriteKit/SpriteKit.h>
namespace nes::app::mac
{
/// Display implementation rendering contents into a SpriteKit node.
class display_spritekit final : public display
{
SKSpriteNode* node_;
NSMutableData* buffer_front_;
NSMutableData* buffer_back_;
u8* bytes_back_;
u8* bytes_front_;
public:
explicit display_spritekit(SKSpriteNode* node);
auto switch_buffers() -> void override;
auto set(u32 x, u32 y, rgb value) -> void override;
};
} // namespace nes::app::mac
|