Wednesday, July 21, 2010

Well I've come a fair way

I did in the end choose to run the whole app fullscreen. Refactoring the code was much faster than I anticipated, managed it in about 10 minutes.

Also, the code worked flawlessly on the laptop, so many a college afternoon were spent happily coding away.

Progress has been in excess since the last update, as I believe I left here with just the path selection screen functional. This now does all sorts of boilerplate things, such as adding a trailing sep, if needed, leading a directory, stripping all ineligible files, and having a list of paths to files magically appear. All quick work; done it hundreds of times before.

After that, it was time for the next section of code. So far the intro is done, leaving the selection/main input section, and the functionality section.

Onto the main input section I went, and that's pretty much where I remain now. It's a biggy.

I won't bore you with the details, but the main chunks of code I've implemented so far are crosshairs as the mouse pointer, to make for more accurate selection, being able to click-drag the canvas, (which was a bugger, due to blitting taking ages, and other such nonsense), and placing crosshairs, which is what I'm on now.

The code I have works, but fairly shoddily. The crosshairs, when placed, jump up, and to the left slightly. Not a gigantic worry, and I could just offset the values by a constant, but I have absolutely no guarantee that that approach would remain accurate on different resolutions, and certainly doesn't fix the problem, only the symptoms.

I'm going to leave it as it is until I have a working prototype, so I can worry about it then.

Next little bit I have to do is passing the right pygame.Rect to the functional section of code, then do some silent iteration, and close tidily. It'll be lovely to see that "print("EOF") at the footer of the code, reached.

Outside of multicrop, and indeed outside of Python entirely, CCP have told me that C++ would be a wery good idea, so I'm teaching myself that. I learn to swim best when I'm at the deep end, so I'ma jump in with some OpenGL nonsense, and play with that, but just being able to do that is a chore. Every tutorial/code sample I've seen out there has been windows-specific OpenGL code. Sometimes with DirectX handling input, and sound, etc. What's the f*cking point?

No comments: