Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    422069

Finnaly. Copy & Paste is done

Sign in to follow this  

79 views

Wheeee Wheeee

And just for fun, here's a Link to the program. There's still a few bugs I'm aware of though.

As the title might suggest, I finally got cut, copy, paste and selections working in my map editor. Hooray! It's pretty nice to use just now, all that's missing is keyboard shortcuts for Ctrl+X, Ctrl+C and Ctrl+V to make my life a little more sane.
The code is a little hacky, but it works perfectly. When you paste something, the editor grabs whatever tiles you're about to replace, and stuffs them in a buffer. Then it pastes the new tiles in. When you move your selection, it puts the old tiles back where the selection was, moves the selection and basically does another paste; replacing whatever is under the new position with whatever is in the selection.
Actually, I suppose it's not that hacky, but I'm sure it could be nicer.
I also added the ability to change the background colour, since a lot of maps won't have a dark background. You can choose between black, red, green, yellow, blue, magenta, cyan and white. I might add the ability to choose any colour, but that'll come later.
Oh, and I disabled full screen mode in the editor, since it screws up the dialog boxes. I know you can tell D3D to allow GDI dialogs to be shown over the window, but I decided to just disallow fullscreen editing. I doubt anyone would really use it much anyway.

My parents are away picking up the kitten now, they should be back in 30 mins or so. Nothing much new to report, except that they've been giving him calcium injections and feeding him dried food mixed with wet.
I'm off out to Opium tonight, for a friends birthday piss up (Well, an aquaintence - a friends sister). Although I don't really want to be out too late, I'm feeling rather lethargic. Some alcohol aught to fix that problem I suppose.

Plans for tomorrow: Clean out my fish tank if I can be bothered, and make a start on doing collision line drawing in the editor.
Still no word from Rockstar (well, it's the weekend), and I believe it's a bank holiday tomorrow. So if I don't hear anything by the time I get up on Tuesday (Probably around 1pm :P), I'll e-mail them to see if anything exciting is happening.

Well, that'll do for now I think...
Sign in to follow this  


2 Comments


Recommended Comments

wouldnt it be easier if you put the pasted tiles in the buffer and draw it over the rest until its deselected (and then write it in the map)? you wouldnt have to update the buffer every movement.
just an idea ;)

Share this comment


Link to comment
Yeah, but that involves letting the map class know about selections and things, which breaks encapsulation a bit. I suppose I could do that, yeah - but this will do fine for now. Performance isn't really an issue in the editor (yet).

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now