Repository navigation
0.1.10
Pre-releaseThe Toypad App LED now works!
The pads now go dark when the game turns them off. Pad 0 means "all three at once", and that is how the game lights them white on connect and, far more often, how it switches them all off again - but 0 was being treated as an invalid pad number, so every one of those commands was dropped. The Toypad app kept drawing whatever colour had been there last, and the pads never went out.
A pad set to pure black is now reported as off rather than as black, so the app stops drawing a glow instead of drawing a black one.
The listener also survives a Toypad app that goes away without closing its connection. Every accepted socket gets a receive deadline now; before this, one such client could block the listener outright and take a thread and a socket
with it.
Alt-tab no longer leaves a button pressed
Losing window focus stops SDL delivering controller events, which left the last frame before the alt-tab sitting in the cache and being read as if it were current. An unfocused window now counts as an inactive pad. A button that was held down when you left is still held when you come back, rather than arriving as a release that never happened.
Console commands for poking at the game
The console (backtick) gained a set of commands for reading and calling into the running game. They are for modders and for anyone digging into how the title works:
peek / poke |
read and write a word of game memory |
findword |
scan memory for a 32-bit value |
call |
call a function in the game, up to 8 arguments |
bindcall |
bind a key to "find an object by its vtable, call a function with it" |
bindcall2 |
the same with two objects, walking pointers out of the second |
poke and call can crash the game if you aim them at the wrong address. That is the nature of the thing; nothing here is reachable by accident.