feat(sched): add HBlank and VBlank events to the scheduler

This commit is contained in:
2022-01-05 17:34:42 -05:00
parent 5037b8f0cc
commit f709458638
6 changed files with 25 additions and 13 deletions

View File

@@ -1,15 +1,18 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const Scheduler = @import("scheduler.zig").Scheduler;
pub const Ppu = struct {
vram: Vram,
palette: Palette,
sched: *Scheduler,
pub fn init(alloc: Allocator) !@This() {
pub fn init(alloc: Allocator, sched: *Scheduler) !@This() {
return @This(){
.vram = try Vram.init(alloc),
.palette = try Palette.init(alloc),
.sched = sched,
};
}