Commit Graph

8 Commits

Author SHA1 Message Date
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 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 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