Starting to feel like a real editor!

Starting to feel like a real editor!

by ferris

This week I continued on editor stuff a bit. I got proper drag selection working, as well as deleting + creating op's, a movable cursor controlled by mouse and keyboard, and some refactoring! Lots of little things that are starting to come together that make this feel like a real tool now :)

I also spent a bunch of time hacking on the size-optimized replayer, as there were some unknowns there. Turns out it was really easy to get up and running though, and at this point I'm 3.5kb uncompressed with a proper window + message pump, a GL context, and a red screen. All I basically had to do was use the i686-msvc version of Rust with no_std which drops the standard library. A couple of compiler option tweaks later and you're at a 1.5kb baseline which does nothing, but that's a great place to start :)

Interestingly (and unexpectedly), Rust's core lib (which is basically a standalone version of their std lib that's meant to be used without actual std for cases like this) didn't provide mainCRTStartup (the default C entry point on Windows at least), but this can basically just be implemented by calling into the actual entry point (or something else, which is what I did as I didn't care about command line args) and calling ExitProcess afterwards. With that, keeping things tight is really just a matter of doing bindings by hand to ensure they're nothing but actual function bindings and not doing a lot of work. There's still lots to be done with the replayer, but at least the biggest unknowns are cleared up and tested and solid. Yay!

So yeah, lots of things are moving forward, still faster than I had originally anticipated. What an awesome feeling! :)