mirror of
https://github.com/Candygoblen123/SwiftNES.git
synced 2025-09-11 04:52:04 -05:00
Render: don't render all sprites for every background tile
This commit is contained in:
@@ -20,12 +20,8 @@ class Bus {
|
||||
|
||||
func tick(_ cycles: UInt8) {
|
||||
self.cycles += Int(cycles)
|
||||
let nmiBefore = ppu.nmiInterrupt != nil
|
||||
//print(nmiBefore)
|
||||
self.ppu.tick(cycles * 3)
|
||||
let nmiAfter = ppu.nmiInterrupt != nil
|
||||
//print(nmiAfter)
|
||||
if !nmiBefore && nmiAfter {
|
||||
let newFrame = self.ppu.tick(cycles * 3)
|
||||
if newFrame {
|
||||
gameloopCallback(ppu)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user