diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-04 23:11:08 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-04 23:11:08 +0100 |
| commit | 79553ab1fa3d707612e80dd03bf95ca65fa0c411 (patch) | |
| tree | f44bec41548d569cfca43c44e0e4ffa7b72ed4ed /app/mac/impl/display-spritekit.hh | |
| parent | 9c45e9c7df1efa5bc1c8e73b6eaef4726b828d3e (diff) | |
refactor file browser
Diffstat (limited to 'app/mac/impl/display-spritekit.hh')
| -rw-r--r-- | app/mac/impl/display-spritekit.hh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/mac/impl/display-spritekit.hh b/app/mac/impl/display-spritekit.hh new file mode 100644 index 0000000..64e3b03 --- /dev/null +++ b/app/mac/impl/display-spritekit.hh @@ -0,0 +1,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_; + + public: + explicit display_spritekit(SKSpriteNode* node); + + virtual auto switch_buffers() -> void override; + virtual auto set(u32 x, u32 y, rgb value) -> void override; + virtual auto get(u32 x, u32 y) const -> rgb override; + }; +} // namespace nes::app::mac
\ No newline at end of file |
