summaryrefslogtreecommitdiff
path: root/src/anim
diff options
context:
space:
mode:
Diffstat (limited to 'src/anim')
-rw-r--r--src/anim/player.zig6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/anim/player.zig b/src/anim/player.zig
index 3b0662d..b329714 100644
--- a/src/anim/player.zig
+++ b/src/anim/player.zig
@@ -71,7 +71,7 @@ pub fn update(s: *State, in: *const sk.Input) void {
var ask: anim.Ask = .{};
var mark: enum { none, previous, next } = .none;
for (in.events) |e| switch (e.kind) {
- .key_down => if (e.flags & sk.Event.repeat == 0 or key(e) == .left or key(e) == .right or key(e) == .comma or key(e) == .period) switch (key(e)) {
+ .key_down => if (e.flags & sk.Event.repeat == 0 or e.key() == .left or e.key() == .right or e.key() == .comma or e.key() == .period) switch (e.key()) {
.space => if (talking) {
ask.next = true;
} else {
@@ -126,10 +126,6 @@ pub fn update(s: *State, in: *const sk.Input) void {
d.update(in, ask, talk, .{});
}
-fn key(e: sk.Event) sk.Key {
- return @fromBackingInt(@intCast(@as(u8, @truncate(e.code))));
-}
-
/// The scene at the deck's `t`: a live one through the deck, with its gates.
fn shotNow(s: *const State, arena: std.mem.Allocator, in: *const sk.Input, mouse: [2]f32) !anim.Shot {
if (@hasDecl(scene, "frame")) return s.deck.shot(arena, in, mouse, scene.frame, .{});