ComSquare
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ComSquare::Debugger::TileViewer Class Reference

window that allow the user to view all data going through the memory bus. More...

#include <TileViewer.hpp>

Inheritance diagram for ComSquare::Debugger::TileViewer:
Collaboration diagram for ComSquare::Debugger::TileViewer:

Public Member Functions

 TileViewer (SNES &snes, ComSquare::PPU::PPU &ppu)
 ctor More...
 
 TileViewer (const TileViewer &)=delete
 copy ctor More...
 
 ~TileViewer () override=default
 dtor More...
 
TileVieweroperator= (const TileViewer &)=delete
 assignment operator More...
 
uint16_t read (uint8_t addr)
 Read data at the CGRAM address send it to the debugger. More...
 
void focus ()
 Focus the debugger's window. More...
 
void setPaletteIndex (int paletteIndex)
 Set the palette to use for render (index of palette) More...
 
void setBpp (int bpp)
 Set the bpp to render graphics. More...
 
void setNbColumns (int nbColumns)
 Set the number of maximum columns. More...
 
void setRenderSize (int size)
 Set the size of ram to render. More...
 
void setRamOffset (int offset)
 Set the ram offset. More...
 
int getBpp () const
 Get the current bpp. More...
 
int getPaletteIndex () const
 Get the index of the current palette used. More...
 
int getNbColumns () const
 Get the numbr of maximum tile columns to render. More...
 
void internalUpdate ()
 Update the tile renderer. More...
 

Private Member Functions

void _bppChangeUIHandler (int index)
 Change the bpp from the index given by the ui (QT combo box) More...
 

Private Attributes

ClosableWindow_window
 The QT window for this debugger. More...
 
SNES_snes
 A reference to the snes (to disable the debugger). More...
 
Ui::TileViewer _ui
 A widget that contain the whole UI. More...
 
ComSquare::PPU::PPU_ppu
 A reference to the ppu. More...
 
std::unique_ptr< Renderer::QtSFMLTileRenderer_sfWidget
 the window More...
 
RAMTileRenderer _ramTileRenderer
 The ram tile renderer. More...
 

Detailed Description

window that allow the user to view all data going through the memory bus.

Constructor & Destructor Documentation

◆ TileViewer() [1/2]

ComSquare::Debugger::TileViewer::TileViewer ( SNES snes,
ComSquare::PPU::PPU ppu 
)
explicit

ctor

◆ TileViewer() [2/2]

ComSquare::Debugger::TileViewer::TileViewer ( const TileViewer )
delete

copy ctor

◆ ~TileViewer()

ComSquare::Debugger::TileViewer::~TileViewer ( )
overridedefault

dtor

Member Function Documentation

◆ _bppChangeUIHandler()

void ComSquare::Debugger::TileViewer::_bppChangeUIHandler ( int  index)
private

Change the bpp from the index given by the ui (QT combo box)

◆ focus()

void ComSquare::Debugger::TileViewer::focus ( )

Focus the debugger's window.

◆ getBpp()

int ComSquare::Debugger::TileViewer::getBpp ( ) const

Get the current bpp.

◆ getNbColumns()

int ComSquare::Debugger::TileViewer::getNbColumns ( ) const

Get the numbr of maximum tile columns to render.

◆ getPaletteIndex()

int ComSquare::Debugger::TileViewer::getPaletteIndex ( ) const

Get the index of the current palette used.

◆ internalUpdate()

void ComSquare::Debugger::TileViewer::internalUpdate ( )

Update the tile renderer.

◆ operator=()

TileViewer& ComSquare::Debugger::TileViewer::operator= ( const TileViewer )
delete

assignment operator

◆ read()

uint16_t ComSquare::Debugger::TileViewer::read ( uint8_t  addr)

Read data at the CGRAM address send it to the debugger.

Parameters
addrThe address to read from.
Returns
The color value in BGR, looks like this xbbbbbgggggrrrrr.

◆ setBpp()

void ComSquare::Debugger::TileViewer::setBpp ( int  bpp)

Set the bpp to render graphics.

◆ setNbColumns()

void ComSquare::Debugger::TileViewer::setNbColumns ( int  nbColumns)

Set the number of maximum columns.

◆ setPaletteIndex()

void ComSquare::Debugger::TileViewer::setPaletteIndex ( int  paletteIndex)

Set the palette to use for render (index of palette)

◆ setRamOffset()

void ComSquare::Debugger::TileViewer::setRamOffset ( int  offset)

Set the ram offset.

◆ setRenderSize()

void ComSquare::Debugger::TileViewer::setRenderSize ( int  size)

Set the size of ram to render.

Member Data Documentation

◆ _ppu

ComSquare::PPU::PPU& ComSquare::Debugger::TileViewer::_ppu
private

A reference to the ppu.

◆ _ramTileRenderer

RAMTileRenderer ComSquare::Debugger::TileViewer::_ramTileRenderer
private

The ram tile renderer.

◆ _sfWidget

std::unique_ptr<Renderer::QtSFMLTileRenderer> ComSquare::Debugger::TileViewer::_sfWidget
private

the window

◆ _snes

SNES& ComSquare::Debugger::TileViewer::_snes
private

A reference to the snes (to disable the debugger).

◆ _ui

Ui::TileViewer ComSquare::Debugger::TileViewer::_ui
private

A widget that contain the whole UI.

◆ _window

ClosableWindow* ComSquare::Debugger::TileViewer::_window
private

The QT window for this debugger.


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