ComSquare
Public Member Functions | List of all members
ComSquare::Renderer::NoRenderer Class Reference

A renderer that discard everything you give. (Used for tests). More...

#include <NoRenderer.hpp>

Inheritance diagram for ComSquare::Renderer::NoRenderer:
Collaboration diagram for ComSquare::Renderer::NoRenderer:

Public Member Functions

void setWindowName (std::string &newWindowName) override
 Set a new name to the window, if there is already a name it will be overwrite. More...
 
void drawScreen () override
 Update the screen by printing the buffer. More...
 
void putPixel (unsigned y, unsigned x, uint32_t rgba) override
 Add a pixel to the buffer to the coordinates x, y with the color rgba. More...
 
void playAudio (std::span< int16_t > samples) override
 Playing all samples from buffer. More...
 
void createWindow (SNES &snes, int maxFPS) override
 Use this function to create the window. More...
 
 NoRenderer (unsigned int height, unsigned int width, int maxFPS)
 Constructor that return the window component of the SFML. More...
 
 NoRenderer (const NoRenderer &)=default
 
NoRendereroperator= (const NoRenderer &)=default
 
 ~NoRenderer ()=default
 

Detailed Description

A renderer that discard everything you give. (Used for tests).

Constructor & Destructor Documentation

◆ NoRenderer() [1/2]

ComSquare::Renderer::NoRenderer::NoRenderer ( unsigned int  height,
unsigned int  width,
int  maxFPS 
)

Constructor that return the window component of the SFML.

Parameters
height_height of the window.
width_width of the window.
maxFPSthe number of maximum FPS for the window.

◆ NoRenderer() [2/2]

ComSquare::Renderer::NoRenderer::NoRenderer ( const NoRenderer )
default

◆ ~NoRenderer()

ComSquare::Renderer::NoRenderer::~NoRenderer ( )
default

Member Function Documentation

◆ createWindow()

void ComSquare::Renderer::NoRenderer::createWindow ( SNES snes,
int  maxFPS 
)
overridevirtual

Use this function to create the window.

Parameters
maxFPSThe number of FPS you aim to run on.

Implements ComSquare::Renderer::IRenderer.

◆ drawScreen()

void ComSquare::Renderer::NoRenderer::drawScreen ( )
overridevirtual

Update the screen by printing the buffer.

Implements ComSquare::Renderer::IRenderer.

◆ operator=()

NoRenderer& ComSquare::Renderer::NoRenderer::operator= ( const NoRenderer )
default

◆ playAudio()

void ComSquare::Renderer::NoRenderer::playAudio ( std::span< int16_t >  samples)
overridevirtual

Playing all samples from buffer.

Parameters
samplesBuffer containing samples
sampleCountnumber of samples inside buffer

Implements ComSquare::Renderer::IRenderer.

◆ putPixel()

void ComSquare::Renderer::NoRenderer::putPixel ( unsigned  y,
unsigned  x,
uint32_t  rgba 
)
overridevirtual

Add a pixel to the buffer to the coordinates x, y with the color rgba.

Parameters
Xhorizontal index.
Yvertical index.
rgbaThe color of the pixel.

Implements ComSquare::Renderer::IRenderer.

◆ setWindowName()

void ComSquare::Renderer::NoRenderer::setWindowName ( std::string &  newWindowName)
overridevirtual

Set a new name to the window, if there is already a name it will be overwrite.

Parameters
newWindowNamenew title for the window.

Implements ComSquare::Renderer::IRenderer.


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