Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: kindermoumoute on July 06, 2010, 05:12:53 pm

Title: MEGR drawing 2.1
Post by: kindermoumoute on July 06, 2010, 05:12:53 pm
Spoiler For French texte:
Voici MEGR2.0 dessin fait en Axe parser, celle ci est 9 fois plus rapide que le crayon de base 2nd=>Draw=>A (je vous laisse en juger par vous même).


- Fonctions de dessins :
* Dessiner des rectangles noir, blanc, ou qui inverse les pixels
* Dessiner des cercles.
* Ecrire du texte sur l'écran.
* Effacer l'écran.
* Enregistrer l'écran dans 9 Pic de la calculatrice (Pic1 à Pic9), qui sont donc réutilisable dans n'importe quel programme TI-Basic, Axe ou autre.
* 3 vitesse pour le crayon (oui c'est trop rapide quand on le laisse au maximum, donc je met des pause pour que ce soit plus agréable à utiliser en fonction des besoins).


- Fonctions du menu principale :
* On peut regarder 2 images en même temps pour faire apparaître 3 niveaux de couleurs.
* On peut regarder, supprimer et modifier n'importe quel image enregistrer entre Pic1-Pic9.

A venir :
- Refonte total de l'interface (menu..etc).



Touches :
menu principale :
2nd ==> nouveau dessin : mène aux options de dessins.

1 ==>   voir image : sélectionner l'image avec les touches 1 à 9, puis appuyez sur entrer pour revenir au menu principale.

2 ==> modifier une image : sélectionner l'image avec les touches 1 à 9, ensuite allé aux options de dessins.

3 ==> Voir 3 degré de couleurs à partir de 2 images (comme pour "voir image", sauf que il faut faire la manip 2 fois pour a appeler la deuxième image).

4 ==> Supprimer image : sélectionner l'image avec les touches 1 à 9, puis l'image est supprimé et l'on revient au menu.

Clear ==> quitter



Options de dessins:

ALPHA ==> retourner au menu principale

Laissez 2nd enfoncé pour déssiner (noir).
Laissez Del enfoncé pour gommer (blanc).
Les flèches => bouger le curseur.
math = vitesse maximal (sans pause).
Apps = pause de 50 millisecondes dans la boucle.
Prgm = pause de 100 millisecondes dans la boucle.
Vars = pause de 200 millisecondes dans la boucle.
1 = Sauver l'écran dans la variable Pic1.
2 = Sauver l'écran dans la variable Pic2.
3 = Sauver l'écran dans la variable Pic3.
4 = Sauver l'écran dans la variable Pic4.
5 = Sauver l'écran dans la variable Pic5.
6 = Sauver l'écran dans la variable Pic6.
7 = Sauver l'écran dans la variable Pic7.
8 = Sauver l'écran dans la variable Pic8.
9 = Sauver l'écran dans la variable Pic9.
Clear = effacer écran.

+ ==> insérer texte, la police de base est en minuscule sans inversion de couleur, pour la modifier il faut appuyer sur alpha :
1 fois = minuscule inversé.
2 fois = Grande police normal.
3 fois = Grande police inversé.
4 fois = revient à minuscule normal.
Une fois que vous avez fini de taper votre texte, appuyez sur entrer.

Laissez Del+F1 enfoncé pour faire le rectangle vide (blanc) ; Note vous pouvez relâcher la touche Del une fois que le curseur a disparu.
Laissez F1 enfoncé pour faire le rectangle plein (noir).
Laissez F2 enfoncé pour faire le rectangle inversé.
Laissez F3 enfoncé pour faire un cercle, ensuite utilisez les flèches gauche et droite pour la taille.




Here MEGR2.0 drawing made in Axe parser, that is 9 times faster than the pencil 2nd base => Draw => A (I let you judge for yourself).


- Features drawings:
* Draw rectangles black, white, or reverse the pixels.
* Draw circles.
* Write the text on the screen.
* Clear the screen.
* Save the screen of in 9 variable Pic (Pic1 to Pic9), which are reusable in any program TI-Basic, or other Axe.
* 3 speed for the pencil (yes it is too fast when left up, so I put the break to make it more pleasant to use as needed).


- Main Menu Functions:
* You can watch two pictures at the same time to reveal three levels of color.
* You can look, delete and edit any image recorded between Pic1-Pic9.

Coming soon:
- Consolidation of interface (menu.. Etc.).



Keys:
Main menu:
2nd ==> new design: the options leads drawings.

1 ==> see image: select the image with the keys 1 to 9, then press enter to return to the main menu.

2 ==> edit an image: select the image with the keys 1-9, then went to the options of drawings.

3 ==> View 3 degree of color from 2 images (like "show image", except that it must be 2 times the manipulation has to call the second image).

4 ==> Delete Image: select image with keys 1 to 9, then the image is deleted and get back to the menu.

Clear ==> quit



Design options:

ALPHA ==> return to main menu

2nd let down for drawing (black).
Leave Del button to erase (white).
Arrows => move the cursor.
Math = maximum speed (without break).
Apps = pause of 50 milliseconds in the loop.
Prgm = pause of 100 milliseconds in the loop.
Vars = pause of 200 milliseconds in the loop.
1 = Save the screen in the variable Pic1.
2 = Save the screen in the variable Pic2.
3 = Save the screen in the variable pic3.
4 = Save the screen in the variable PiC4.
5 = Save the screen in the variable pic5.
6 = Save the screen in the variable Pic6.
7 = Save the screen in the variable Pic7.
8 = Save the screen in the variable Pic8.
9 = Save the screen in the variable Pic9.
Clear = clear screen.

+  ==> Insert text, the basic policy is lowercase with no color inversion, for the change must be supported on Alpha:
1 time = lower reverse.
2 times = Big font normal.
3 times = Large font reversed.
4 times =  lower normal.
Once you've finished typing your text, press enter.

Leave Del+F1 down to the empty rectangle (white). Note : you can release the Del key once the cursor has disappeared.
Leave F1 down to the solid rectangle (black).
Leave F2 pressed to reverse the rectangle.
Leave F3 button to make a circle, then use the arrows left and right size.


Actually code :
Code: [Select]
:.MEGR2.0
:"Pic1→Str1
:"Pic2
:[00]
:"Pic3
:[00]
:"Pic4
:[00]
:"Pic5
:[00]
:"Pic6
:[00]
:"Pic7
:[00]
:"Pic8
:[00]
:"Pic9
:[00]
:":PIC →Str14
:"MEGR2.0 DRAW :→Str15
:"2ND:NEW→Str16
:"1:LOOK→Str17
:"2:CHANGE→Str18
:"3:LOOK GRAYSCALE→Str19
:"4:DELETE PIC→Str20
:"CLR:QUIT→Str21
:0→Q→F→E→H→W→R→G
:1→I→T
:31→X+16→Y
:ClrHome
:ClrDraw
:ClrDraw<sup>r</sup>
:Repeat getKey(15)
:Text(0,0,Str15
:Text(0,14,Str16
:Text(0,21,Str17
:Text(0,28,Str18
:Text(0,35,Str19
:Text(0,42,Str20
:Text(0,49,Str21
:If getKey(34) or getKey(26) or getKey(18) or getKey(35) or getKey(54)
:If getKey(54)
:sub(GO)
:sub(A
:End
:If getKey(34)
:sub(GO)
:2→G
:sub(M
:If M
:0→M
:sub(B
:End
:End
:If getKey(26)
:sub(GO)
:1→G→Q
:sub(M
:If M
:0→M
:sub(B
:End
:End
:If getKey(18)
:sub(M
:If M
:0→M
:sub(B
:End
:End
:If getKey(35)
:sub(M
:If M
:0→M
:DelVar Str1+I
:End
:End
:ClrDraw<sup>r</sup>
:ClrDraw
:ClrHome
:End
:End
:Return
:
:Lbl B
:GetCalc(Str1+I,768)→R
:R→DispGraph
:StoreGDB
:Archive Str1+I
:1→I
:!If G
:StorePic
:Archive Str1+I
:1→G
:Repeat getKey(9)
:End
:sub(M
:If M
:0→M
:Goto B
:End
:End
:!If Q=1
:Repeat getKey(9)
:If G=2
:DispGraph
:Else
:DispGraph<sup>r</sup>
:End
:End
:0→G→Q
:Return
:Else
:ClrHome
:0→G→Q
:End
:
:Lbl A
:Pause 500
:Repeat getKey(48)
:Pxl-Change(X,Y)
:DispGraph
:
:.!If getKey(54)
:Pxl-Change(X,Y)
:If getKey(54)
:Pxl-On(X,Y)
:End
:If getKey(56)
:Pxl-Off(X,Y)
:End
:sub(I
:If I≠1
:If M
:0→M
:DelVar Str1+I
:End
:Pxl-Off(X,Y)
:DispGraph
:StoreGDB
:GetCalc(Str1+I,768)→A
:conj(L<sub>6</sub>,A,768)
:Archive Str1+I
:1→I
:End
:If getKey(10)
:sub(IN)
:End
:If getKey(53) or getKey(52)
:If getKey(53)
:1→R
:End
:If getKey(52)
:0→R
:End
:While getKey(53)
:sub(R
:End
:While getKey(52)
:sub(R
:End
:If R
:ref(X,Y,W,H)
:End
:!If R
:rref(X,Y,W,H)
:End
:0→W→H
:End
:If getKey(15)
:ClrHome
:ClrDraw
:End
:sub(T
:If getKey(1) and (Y≠64
:Y+1→Y
:End
:If getKey(2) and (X≠0
:X-1→X
:End
:If getKey(3) and (X≠96
:X+1→X
:End
:If getKey(4) and (Y≠0
:Y-1→Y
:End
:End
:Goto GO
:
:Lbl R
:ClrDraw<sup>r</sup>
:StorePic
:If R
:ref(X,Y,W,H)<sup>r</sup>
:End
:!If R
:rref(X,Y,W,H)<sup>r</sup>
:End
:DispGraph<sup>r</sup>
:sub(T
:If getKey(1) and ((H+Y)≠63
:H+1→H
:End
:If getKey(2) and (W≠0
:W-1→W
:End
:If getKey(3) and ((X+W)≠95
:W+1→W
:End
:If getKey(4) and (H≠0
:H-1→H
:End
:Return
:
:Lbl IN
:X→A
:Y→B
:"wrmh"→GDB5
:det(3)
:"vqlg"
:det(3)
:"zupkfc"
:det(1)
:" ytojeb"
:det(2)
:"xsnida"
:Repeat C=9
:getKey→C
:If A≠96
:If C>10 and (C<48)
:If {C+GDB5-11}→D
:Text(A,B,D►Frac
:A+4→A
:End
:End
:End
:End
:StoreGDB
:0→A→B→C→D
:Return
:
:Lbl T
:If getKey(47)
:1→T
:End
:If getKey(39)
:50→T
:End
:If getKey(31)
:100→T
:End
:If getKey(23)
:200→T
:End
:Pause T
:Return
:
:Lbl M
:ClrHome
:Repeat E=9
:E+1→E
:F+6→F
:Text(0,F,E►Dec,Str14,E►Dec
:End
:0→E→F
:Repeat I≠1
:sub(I
:End
:
:Lbl I
:If getKey(34)
:0→I
:End
:If getKey(26)
:4→I
:End
:If getKey(18)
:8→I
:End
:If getKey(35)
:12→I
:End
:If getKey(27)
:16→I
:End
:If getKey(19)
:20→I
:End
:If getKey(36)
:24→I
:End
:If getKey(28)
:28→I
:End
:If getKey(20)
:32→I
:End
:
:UnArchive Str1+I
:If GetCalc(Str1+I)
:1→M
:End
:
:Lbl GO
:Repeat getKey(0)
:End


Screen and folder with source and executable :
Title: Re: [English/French topic] Megr drawing 2.0 ; Megr dessin 2.0
Post by: DJ Omnimaga on July 06, 2010, 06:58:06 pm
Wow cool, j'ai toujours trouvé qu'en BASIC c'était lent, même sous le TI-OS. Est-ce que tu vas ajouter des trucs comme dessiner des rectangles? (sinon, différente tailles du pinceau feront l'affaire).

Aussi bonne idée d'ajouter des règlages de vitesse, sinon ce serait assez pénible de dessiner avec précision x.x
Title: Re: [English/French topic] Megr drawing 2.0 ; Megr dessin 2.0
Post by: kindermoumoute on July 07, 2010, 05:10:13 am
Oui, je pourrais rajouter des outils de géométries et tout le tralala, mais pour l'instant j'ai encore des problème avec les appsvars :/ si quelqu'un pourrait m'aider un peu   ?


Yes, i can add tools geometry and all, for the time being i've problems yet with appsvars :/ if someone can help me    ?


PS : DJ traduit ton texte.
Title: Re: [English/French topic] Megr drawing 2.0 ; Megr dessin 2.0
Post by: DJ Omnimaga on July 07, 2010, 12:12:18 pm
Oh dsl ça ne me tentais pas de traduire hier :P (sorry I didn't felt like translating yesterday :P)

What I was saying in French was nice work and that I always thought it was slow in BASIC or through the TI-OS to draw stuff, then asked if he will add stuff like rectangle-filling (although it could be drawn via larger pen size means), and I said it was a good idea to add speed settings for the pen movement, else it would be rather hectic to draw stuff accurately.
Title: Re: [English/French topic] Megr drawing 2.0 ; Megr dessin 2.0
Post by: kindermoumoute on September 12, 2010, 12:37:50 pm
Good! I finally was able to manipulate variables base peak and my program runs without crashing almost (i say almost ^^).

I EDIT my first post!
Title: Re: [English/French topic] Megr drawing 2.0 ; Megr dessin 2.0
Post by: DJ Omnimaga on September 12, 2010, 12:49:04 pm
Cool, nice to hear! :D
Title: Re: [English/French topic] Megr drawing 2.0 ; Megr dessin 2.0
Post by: kindermoumoute on September 12, 2010, 04:26:55 pm
Ops, correction crash on start sry ^^
Title: Re: MEGR drawing 2.0
Post by: kindermoumoute on September 15, 2010, 08:27:26 am
Correction of a few bug, and 2 new option :
Draw rect and invert rect.
And clear screen in draw option.
Title: Re: MEGR drawing 2.0
Post by: DJ Omnimaga on September 15, 2010, 02:46:19 pm
Pretty nice! I love how the rectangles are grayscale when drawn :D
Title: Re: MEGR drawing 2.0
Post by: kindermoumoute on September 29, 2010, 11:28:40 am
EDIT : look first post!

PS : I think we need move this topic to "Other Calc-Related Projects And Ideas", no?
Title: Re: MEGR drawing 2.0
Post by: DJ Omnimaga on September 29, 2010, 01:12:20 pm
Nice update! I really need to try this on calc at one point :)

Also yeah I should scan the Axe Parser section to see if I can move a bunch of project topics out of there, especially ones that are not aimed solely towards Axe development.
Title: Re: MEGR drawing 2.0
Post by: kindermoumoute on September 29, 2010, 01:43:58 pm
I just figured out some problems not complicated to solve (Especially in the disappearance of variables Pic), but there's always one that I reported here (http://ourl.ca/70210) (is regarding the 5 extra lines in my images).
Title: Re: MEGR drawing 2.0
Post by: DJ Omnimaga on September 29, 2010, 01:54:59 pm
Ok I'll go check. I cannot guarantee I can solve it, though.
Title: Re: MEGR drawing 2.0
Post by: jacques on September 29, 2010, 03:37:22 pm
Wow, awesome !  :D
Title: Re: MEGR drawing 2.0
Post by: kindermoumoute on September 29, 2010, 03:50:13 pm
New version, with ability to delete images, but mostly a lot of bug correction (in reality there is only one of the 5 lines lost at the top: /)
Title: Re: MEGR drawing 2.0
Post by: DJ Omnimaga on September 29, 2010, 03:58:19 pm
Nice :D
Title: Re: MEGR drawing 2.0
Post by: ztrumpet on September 29, 2010, 04:29:06 pm
Looks great Kinder! ;D
Title: Re: MEGR drawing 2.0
Post by: meishe91 on September 29, 2010, 05:55:53 pm
Looks really cool :) Good luck on more progress!
Title: Re: MEGR drawing 2.0
Post by: DJ Omnimaga on September 29, 2010, 11:25:52 pm
Btw I tried the update and it's nice so far. I was surprised that even at the fastest speed it was not too hard to draw stuff.

Only suggestion I have is that when you move around, it won't erase anything unless you hold down another button to erase. Otherwise it is fine so far.
Title: Re: MEGR drawing 2.0
Post by: kindermoumoute on September 30, 2010, 02:18:03 am
Nice idea, i will update it.

Ps : thank ton move ;)
Title: Re: MEGR drawing 2.0
Post by: kindermoumoute on September 30, 2010, 02:51:08 am
EDIT : update, i'll post new screen next, but source and exec are update.
Title: Re: MEGR drawing 2.0
Post by: DJ Omnimaga on September 30, 2010, 02:53:05 am
Cool, what does this new update provides more? :D
Title: Re: MEGR drawing 2.0
Post by: kindermoumoute on September 30, 2010, 01:34:25 pm
Cursor is always invert, as you ask.
Title: Re: MEGR drawing 2.0
Post by: DJ Omnimaga on September 30, 2010, 05:38:13 pm
Ah ok cool :D
Title: Re: MEGR drawing 2.0
Post by: kindermoumoute on October 02, 2010, 08:23:51 am
Plop, new update with an important feature : we can write text on screen!

i update first post, executable and screen :
(http://www.omnimaga.org/index.php?action=dlattach;topic=3694.0;attach=3588;image)

in future i'll add more option text if you want (invert text, big text, ..etc).
Title: Re: MEGR drawing 2.0.1
Post by: DJ Omnimaga on October 02, 2010, 10:08:56 am
Nice :D, should make it more complete :D

Hopefully that can become handy for drawing title screens without having to be on the computer. :D
Title: Re: MEGR drawing 2.0.1
Post by: shmibs on October 02, 2010, 11:37:24 am
ooh, delicious.
you should slow down the speed of the cursor, though(as in the screenshot it looks like that's a bit of a problem) and then add a gui mouse or something with acceleration that can be swapped to for moving across the screen quickly
Title: Re: MEGR drawing 2.0.1
Post by: kindermoumoute on October 02, 2010, 11:44:45 am
ooh, delicious.
you should slow down the speed of the cursor, though(as in the screenshot it looks like that's a bit of a problem) and then add a gui mouse or something with acceleration that can be swapped to for moving across the screen quickly

There is already 4 speed option (Look first post) and a mouse is a nice idea!
Title: Re: MEGR drawing 2.0.1
Post by: ztrumpet on October 03, 2010, 10:15:52 am
That looks wonderful!  Nice job Kinder! ;D
Title: Re: MEGR drawing 2.0.2
Post by: kindermoumoute on October 10, 2010, 09:44:35 am
New update, 2.0.2 MEGR, a small screen:
(http://img232.imageshack.us/img232/2451/megr20nobug.gif)

Everything is marked first post but I want to say that there is no bug to save and restore pictures (finally  ;D).
Title: Re: MEGR drawing 2.0.2
Post by: DJ Omnimaga on October 10, 2010, 01:47:33 pm
Oh I love the new icon  and I'm glad the bugs were fixed. :D

What are the other changes besides this in this new version?

Also in the future you might want to upload a zip file instead of a rar file, because at school and libraries, some people are stuck with Winzip or the default Windows extractor, which don't support RAR files, and those computers are locked down so they cannot install 7-Zip or WinRAR. Same goes for people who use their parent computers.
Title: Re: MEGR drawing 2.0.2
Post by: ASHBAD_ALVIN on October 10, 2010, 01:51:21 pm
Yeah, I need a zip file to test it out :(

I looks great!  I started to make something like this with xLib basic many a year ago, but as you can guess, it wasn't fast enough for my evil needs  :'(
Title: Re: MEGR drawing 2.0.2
Post by: DJ Omnimaga on October 10, 2010, 02:48:50 pm
Yeah in BASIC, you will most likely end up with the same speed as you would get with the TI-OS drawing tools. :(
Title: Re: MEGR drawing 2.0.2
Post by: ASHBAD_ALVIN on October 10, 2010, 02:49:27 pm
same speed, but much more evil ;)
Title: Re: MEGR drawing 2.0.2
Post by: kindermoumoute on October 10, 2010, 03:08:39 pm
It's good, I put a zip file!
Feel free to ask questions and give ideas for improvements.

PS: also read the first post, I constantly updates.
Title: Re: MEGR drawing 2.0.2
Post by: ASHBAD_ALVIN on October 10, 2010, 03:09:22 pm
Hmm... I'll download that now.  Looks like it'll be pretty cool.
Title: Re: MEGR drawing 2.0.2
Post by: kindermoumoute on October 10, 2010, 03:28:00 pm
Hmm... I'll download that now.  Looks like it'll be pretty cool.

I think this version is enjoyable to use.
Title: Re: MEGR drawing 2.0.2
Post by: ASHBAD_ALVIN on October 10, 2010, 03:29:53 pm
I've tried it a bit so far, looks promising ;)
Title: Re: MEGR drawing 2.0.2
Post by: ztrumpet on October 10, 2010, 03:31:50 pm
The new version looks wonderful, Kinder. :)  I'm glad you got that bug fixed. ;D
Title: Re: MEGR drawing 2.0.2
Post by: kindermoumoute on October 19, 2010, 11:40:47 am
Thanks.
Have you idea for a cursor for text (compatible all fix) ?