BEEP-8 Helper Lib 1.0.0
Loading...
Searching...
No Matches
CNesCtrl Class Reference

NES controller emulation class. More...

#include <nesctrl.h>

Public Member Functions

void Reset ()
 Reset the NES controller state and load images.
 
void Step ()
 Process touch events and update the controller state.
 
void Draw (b8PpuCmd *pcmd, u32 otz)
 Draw the NES controller on the screen.
 
u32 GetCntHold (ENesCtrl enc)
 Get the hold count for a specific button.
 
u32 GetCntRelease (ENesCtrl enc)
 Get the release count for a specific button.
 
 CNesCtrl (const CfgNesCtrl &cfg)
 Constructor for CNesCtrl.
 
 ~CNesCtrl ()
 Destructor for CNesCtrl.
 

Detailed Description

NES controller emulation class.

This class emulates an NES controller using touch screen inputs. It processes touch events, updates the controller state, and renders the controller on the screen.

Constructor & Destructor Documentation

◆ CNesCtrl()

CNesCtrl::CNesCtrl ( const CfgNesCtrl & cfg)

Constructor for CNesCtrl.

Parameters
cfgConfiguration for the NES controller.

Member Function Documentation

◆ Draw()

void CNesCtrl::Draw ( b8PpuCmd * pcmd,
u32 otz )

Draw the NES controller on the screen.

Parameters
pcmdPointer to the PPU command buffer.
otzOrder of drawing.

◆ GetCntHold()

u32 CNesCtrl::GetCntHold ( ENesCtrl enc)

Get the hold count for a specific button.

Parameters
encNES controller button.
Returns
Number of frames the button has been held.

◆ GetCntRelease()

u32 CNesCtrl::GetCntRelease ( ENesCtrl enc)

Get the release count for a specific button.

Parameters
encNES controller button.
Returns
Number of frames since the button was released.

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