Author Topic: Copy-and-Paste  (Read 4186 times)

0 Members and 1 Guest are viewing this topic.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Copy-and-Paste
« on: April 08, 2010, 09:44:32 pm »
Hello fellow Omnimaganites,

For the past four or five days I have been working on a picture copy and paste program that will let you move a section of a picture somewhere else on the screen and save it into Pic1 (it also pulls the image from that file). It can help you moves sprites around or anything else you need it for. Very easy to use.

How To Use:
1. Have the image to be moved in either Pic1 or on the graph screen. (Make sure axes are off, unless needed for the picture.)
2. Execute the program.
3. a. Hit any button to continue if file is in Pic1 already.
    b. Hit [2ND] if it is just on the graph screen. It will store it to Pic1 for you.
4. Scroll over to the top left corner of your image to be moved
Code: [Select]
The image:
__________
_███__███_
_█_█__█_█_
_█_████_█_
_█______█_
_█_████_█_
_█_█__█_█_
_███__███_
__________

Where your cursor should be:
░_________
_███__███_
_█_█__█_█_
_█_████_█_
_█______█_
_█_████_█_
_█_█__█_█_
_███__███_
__________
5. Push [2ND].
6. Draw the box around your image.
Code: [Select]
Correct box:
░░░░░░░░░░
░███__███░
░█_█__█_█░
░█_████_█░
░█______█░
░█_████_█░
░█_█__█_█░
░███__███░
░░░░░░░░░░

Incorrect box:
__________
_░░░░░░░░_
_░_█__█_░_
_░_████_░_
_░______░_
_░_████_░_
_░_█__█_░_
_░░░░░░░░_
__________
7. Press [2ND].
8. Move box to where it should be placed.
9. Press [2ND].
10. You're done. It is now stored into Pic1.

Controls:
►, ◄, ▲, ▼ - Move around the screen.
[2ND] - Stores graph screen to Pic1 at programs start. Advances the program when using.
[ALPHA] - Toggles between moving one or five pixels at a time.

Side Note:
-If you would like to change the picture numbers you may. Note though that the first two must remain the same but the last one you can change.
Code: [Select]
PROGRAM:CP
...code...
StorePic 1 //Can change to what ever picture number you want to. (Not extended ones.)
...code...
RecallPic 1 //Must be the same as the previous StorePic #.
...code...
RecallPic 1 //Same deal here. Must be the same as the StorePic #.
...code...
StorePic 1 //This one you can change to which ever number you want. (Not extended ones.)

Special Thanks:
Builderboy - For going over the code looking for optimizations.

Thanks for reading this far, if you did :P, and I hope someone gets use out of this program. I do plan to work on it more at some point and make it more functional (such as a way to not delete the rest of the image or something). Builderboy also gave me the idea of a different way that would be faster for redrawing but there are some restrictions to that method, so we shall see. Again, I hope you guys enjoy this and find it useful :)
« Last Edit: April 10, 2010, 06:07:29 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Copy-and-Paste
« Reply #1 on: April 08, 2010, 10:39:18 pm »
nice, would it mimic Omnicalc Clipboard functionality? I am a bit curious about how it interacts

_player1537

  • Guest
Re: Copy-and-Paste
« Reply #2 on: April 08, 2010, 10:41:00 pm »
I could use this in a program I was making a while ago, a text editor in ti-basic.  ooh, and with Axe's appvar support I could write it in axe...oh but it doesn't do everything the same, oh well :)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Copy-and-Paste
« Reply #3 on: April 08, 2010, 10:48:08 pm »
I have no idea what Omnicalc's clipboard function looks like so I couldn't tell ya. Sorry.

As soon as I have my AP Physics homework done I'll work on it some more so I can get it posted.
« Last Edit: April 08, 2010, 10:49:01 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Copy-and-Paste
« Reply #4 on: April 08, 2010, 11:25:05 pm »
Aaah ok, the Omnicalc clipboard function let you select text on the home screen by doing some key combinations then pasting it. However it was too buggy and they removed it (loads of Y= vars of around 50 KB in size showed in MEM menu and pressing Y= could cause random crashes)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Copy-and-Paste
« Reply #5 on: April 09, 2010, 12:04:08 am »
Oh, this isn't a text copy-and-paste program, my bad :P It is for use on pictures. Like if you're messing around or something or place a tile wrong or something and you wanna move it somewhere else you can simply use this.

Though, now I'm tempted to try to create a text copy-and-paste ;)
« Last Edit: April 09, 2010, 12:04:35 am by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Copy-and-Paste
« Reply #6 on: April 09, 2010, 12:38:38 am »
oooh I see now x.x

That's pretty cool, because I often needed to copy/paste or move tiles in a spritesheet and the like, and it was a major hassle to do it manually, typing all xLIB commands and parameters

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Copy-and-Paste
« Reply #7 on: April 10, 2010, 03:57:16 am »
Just posted the first version of the program. I'll do more stuff later today because I wanna sleep :P
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Copy-and-Paste
« Reply #8 on: April 10, 2010, 03:58:27 am »
Cool I'll try later ^^

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Copy-and-Paste
« Reply #9 on: April 10, 2010, 04:01:07 am »
Sweet.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)