yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::core::Sdl2Backend Class Reference

#include <backend.h>

Inheritance diagram for yaze::core::Sdl2Backend:
Collaboration diagram for yaze::core::Sdl2Backend:

Public Member Functions

 Sdl2Backend ()=default
 
 ~Sdl2Backend ()=default
 
void init ()
 
void init_audio ()
 
void shutdown_audio ()
 
void shutdown ()
 
void new_frame ()
 
void render ()
 
auto window_ptr () -> SDL_Window *
 
auto audio_device () -> SDL_AudioDeviceID
 
auto audio_buffer () -> std::shared_ptr< int16_t >
 
- Public Member Functions inherited from yaze::core::PlatformBackend< Sdl2Backend >
 PlatformBackend ()=default
 
 ~PlatformBackend ()=default
 
void init ()
 
void init_audio ()
 
void shutdown_audio ()
 
void shutdown ()
 
void new_frame ()
 
void render ()
 

Private Attributes

SDL_AudioDeviceID audio_device_
 
std::shared_ptr< int16_t > audio_buffer_
 
std::unique_ptr< SDL_Window, SDL_Deleterwindow
 

Detailed Description

Definition at line 31 of file backend.h.

Constructor & Destructor Documentation

◆ Sdl2Backend()

yaze::core::Sdl2Backend::Sdl2Backend ( )
default

◆ ~Sdl2Backend()

yaze::core::Sdl2Backend::~Sdl2Backend ( )
default

Member Function Documentation

◆ init()

void yaze::core::Sdl2Backend::init ( )
inline

Definition at line 36 of file backend.h.

References yaze::core::Renderer::GetInstance(), and window.

Here is the call graph for this function:

◆ init_audio()

void yaze::core::Sdl2Backend::init_audio ( )
inline

Definition at line 68 of file backend.h.

References audio_buffer_, and audio_device_.

◆ shutdown_audio()

void yaze::core::Sdl2Backend::shutdown_audio ( )
inline

Definition at line 86 of file backend.h.

References audio_device_.

◆ shutdown()

void yaze::core::Sdl2Backend::shutdown ( )
inline

Definition at line 91 of file backend.h.

References yaze::core::Renderer::GetInstance(), and window.

Here is the call graph for this function:

◆ new_frame()

void yaze::core::Sdl2Backend::new_frame ( )
inline

Definition at line 99 of file backend.h.

◆ render()

void yaze::core::Sdl2Backend::render ( )
inline

Definition at line 104 of file backend.h.

References yaze::core::Renderer::GetInstance().

Here is the call graph for this function:

◆ window_ptr()

auto yaze::core::Sdl2Backend::window_ptr ( ) -> SDL_Window *
inline

Definition at line 112 of file backend.h.

References window.

◆ audio_device()

auto yaze::core::Sdl2Backend::audio_device ( ) -> SDL_AudioDeviceID
inline

Definition at line 113 of file backend.h.

References audio_device_.

◆ audio_buffer()

auto yaze::core::Sdl2Backend::audio_buffer ( ) -> std::shared_ptr<int16_t>
inline

Definition at line 114 of file backend.h.

References audio_buffer_.

Member Data Documentation

◆ audio_device_

SDL_AudioDeviceID yaze::core::Sdl2Backend::audio_device_
private

Definition at line 117 of file backend.h.

Referenced by audio_device(), init_audio(), and shutdown_audio().

◆ audio_buffer_

std::shared_ptr<int16_t> yaze::core::Sdl2Backend::audio_buffer_
private

Definition at line 118 of file backend.h.

Referenced by audio_buffer(), and init_audio().

◆ window

std::unique_ptr<SDL_Window, SDL_Deleter> yaze::core::Sdl2Backend::window
private

Definition at line 119 of file backend.h.

Referenced by init(), shutdown(), and window_ptr().


The documentation for this class was generated from the following file: