Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Display ¶
type Display struct { Window *pixelgl.Window DisplayFps bool DisplayInstructions bool // contains filtered or unexported fields }
Display represents a display for the CHIP-8 emulator
func NewDisplay ¶
NewDisplay creates and initializes a new Display instance
func (*Display) DisplayNotification ¶
DisplayNotification displays the given text for a short time
func (*Display) Draw ¶
func (disp *Display) Draw(vmem videomemory.VideoMemory)
Draw draws the content of the given VideoMemory to the window
func (*Display) ToggleFullscreen ¶
func (disp *Display) ToggleFullscreen()
ToggleFullscreen toggles between fullscreen and windowed
func (*Display) ToggleVSync ¶
func (disp *Display) ToggleVSync()
ToggleVSync toggles between vsync on and off
type Emulator ¶
type Emulator struct {
// contains filtered or unexported fields
}
Emulator implements the CHIP-8 emulator
type FpsCounter ¶
type FpsCounter struct {
// contains filtered or unexported fields
}
FpsCounter calculates the frames per second
func NewFpsCounter ¶
func NewFpsCounter() *FpsCounter
NewFpsCounter creates and initializes a new instance
func (*FpsCounter) Tick ¶
func (fps *FpsCounter) Tick() float64
Tick needs to be called every time a frame is drawn and returns the current fps value
Click to show internal directories.
Click to hide internal directories.