Commit Graph

31 Commits

Author SHA1 Message Date
Eli Ribble 0d4574f205 Add working server example. 2024-07-30 19:44:32 -07:00
Eli Ribble 9869fd6718 Working Makefile for client program. 2024-07-30 19:44:32 -07:00
Eli Ribble 5357c54180 Add sample client files from capnproto.
Still working on the build logic.
2024-07-30 19:44:32 -07:00
Eli Ribble 33c73c8060 Use a proper file extension for C++
These don't exist on Linux, but they are a fun fiction.
2024-07-30 19:44:32 -07:00
Eli Ribble 694ef2a466 Switch (badly) to C++
This is so I can use capnproto without adding a 3rd party compiler.
2024-07-30 19:44:32 -07:00
Eli Ribble a461c8eb6a Remove uinput-test.
I just used it to learn stuff, don't need it now.
2024-07-30 19:44:32 -07:00
Eli Ribble a88c7c654a Use perror instead of our own crapily-implemented version.
Yay standards.
2024-07-30 19:44:32 -07:00
Eli Ribble 8985f990cb Switch from storing total seconds to storing deltas.
This is conceptually simpler and makes the files easier to manipulate and
concatenate. It also avoids a bug where we would send a large negative
time when we loop for multiple playbacks.
2024-07-30 19:44:32 -07:00
Eli Ribble 0d0d14cc39 Add logic to loop and additional error information on sleep failure. 2024-07-30 19:44:32 -07:00
Eli Ribble a3cb632170 Get python versions up-to-date.
I can't remember now why I did all this, but I did. It's fine.
2024-07-30 19:44:32 -07:00
Eli Ribble 7664f34de5 Drop events from the keyboard of type ...
Not sure what, can't remember, can't be bothered to look it up.
2024-07-30 19:44:32 -07:00
Eli Ribble d64a981c76 Wait 3 seconds to start playback.
Then I can get the game set up.
2024-07-30 19:44:32 -07:00
Eli Ribble 0c3ae88b5a Invert mouse playback.
Without this we go exactly the wrong way in the Y direction. This is likely an
issue with my game rather than the playback.
2024-07-30 19:44:32 -07:00
Eli Ribble e65e442276 Add support for hotkey on capture.
We need this so that we can ensure to line up where our character is before we
get going.
2024-07-30 19:44:32 -07:00
Eli Ribble a3579fd339 Add support for playing back keyboard messages.
Also fix a timing bug where I was waiting 1 second too long
any time the nansec clock rolled over.
2024-07-30 19:44:32 -07:00
Eli Ribble 829432d443 Make mouse playback work.
This only includes left mouse button clicks, not right mouse button
clicks or scrollwheels.
2024-07-30 19:44:32 -07:00
Eli Ribble 61843f23c3 Add sleep logic in playback.
This also removes the "." between the seconds and nanos so that we don't mistake it
for a float, which it isn't.
2024-07-30 19:44:32 -07:00
Eli Ribble 6ed5162e8e Add playback implementation in C.
It doesn't do anything but read lines yet.
2024-07-30 19:44:32 -07:00
Eli Ribble 4a0e7834b3 Flush stdout so our file gets written immediately 2024-07-30 19:44:32 -07:00
Eli Ribble 165623fa20 Add basic Makefile and output directory 2024-07-30 19:44:32 -07:00
Eli Ribble ccc44b676c Show event content for keyboard. 2024-07-30 19:44:32 -07:00
Eli Ribble 54201de47b Add epoll implementation to capture keyboard and mouse.
Yay, double capture!
2024-07-30 19:44:32 -07:00
Eli Ribble ce83c74991 Add working beginnings of capture program.
Only does a single mouse at this point, but it's super fast and the resolution
is perfect.
2024-07-30 19:44:32 -07:00
Eli Ribble 692772f809 Add working C program to get tiny mouse movements.
Turns out that the Python mouse library is losing the fine-grained mouse
position data, which we really need.
2024-07-30 19:44:32 -07:00
Eli Ribble 02f04b78a6 Show mouse raw input from mouse library.
I'm missing a bunch of precision which is no good for capture.
2024-07-30 19:44:32 -07:00
Eli Ribble 71553e0648 Add my uinput test program.
I used this to debug the interations with the kernel module in
the Python code and determine which structs or constants had changed.
2024-07-30 19:44:32 -07:00
Eli Ribble 76f9b495e2 Add a short program to dump key information. 2024-07-30 19:44:32 -07:00
Eli Ribble 17bcf23de2 Add initial gitignore 2024-07-30 19:44:32 -07:00
Eli Ribble 342926610b Add initial working implementation of capture and playback.
This only works on my system with my modified version of
the mouse library.
2024-07-30 19:44:32 -07:00
Eli Ribble ff8955506d Add initial README. 2024-07-30 19:44:30 -07:00
eliribble f55fa715f2 Initial commit 2024-07-30 19:43:16 -07:00