From 7c6894614dcc3ebc5d4c8839b64f4da761b5ccf0 Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 2 Feb 2023 01:02:03 -0800 Subject: Begin work adding emotes Done: * Users can add images to Fonts/Emotes/ * The basename of that image ('clueless.png' becomes 'clueless') is the keyword to make the image show up in game. * Fix a bug in the shader where letters on the 2nd texture and later would have UV outside of [0.0, 1.0] Not yet implemented: * transcribed words are encoded using emotes mapping --- Scripts/osc_ctrl.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Scripts/osc_ctrl.py') diff --git a/Scripts/osc_ctrl.py b/Scripts/osc_ctrl.py index 93b236b..750059f 100644 --- a/Scripts/osc_ctrl.py +++ b/Scripts/osc_ctrl.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 -import argparse +from emotes_v2 import EmotesState from generate_utils import config -import generate_utils +from math import ceil from paging import MultiLinePager from pythonosc import udp_client -from math import ceil + +import argparse +import generate_utils import time # Based on a couple experiments, this seems like about as fast as we can go @@ -87,7 +89,7 @@ def updateRegion(client, region_idx, letter_encoded): # Sends one slice of `msg` to the board then returns. Slices are sent # in FIFO order; e.g., the most recently spoken words are sent last. # Returns True if done paging, False otherwise. -def pageMessage(osc_state: OscState, msg: str) -> bool: +def pageMessage(osc_state: OscState, msg: str, estate: EmotesState) -> bool: msg_slice, slice_idx = osc_state.pager.getNextSlice(msg) if slice_idx == -1: return True -- cgit v1.2.3