Author Topic: Windows XP in Axe  (Read 6379 times)

0 Members and 1 Guest are viewing this topic.

Siphonic_Sugar

• LV3 Member (Next: 100)
• Posts: 51
• Rating: +0/-0
Windows XP in Axe
« on: August 12, 2015, 08:12:30 pm »
So lately, I've been thinking about making another version of Windows XP but this time, unlike every single other version that most people know of, this one will be made in axe. I already have the mouse thing set up...
Code: [Select]
.WINDOWXPClrDrawClrHome32->Y48->X[E0C0A00000000000]->Pic1Repeat getkey(15)Pt-On(X,Y,Pic1Line(0,0,95,0        \\Lines for a borderLine(0,63,95,63     \\Line(0,0,63,0         \\Line(95,0,95,63      \\If getkey(1)If Y(doesn't equal)61Y+1->YEndEndIf getkey(2)If X(doesn't equal)1X-1->XEndEndIf getkey(3)If X(doesn't equal)93X+1->XEndEndIf getkey(4)If Y(doesn't equal)1Y-1->YEndEndClrDrawDispGraphEndBut the problem is, I don't know how to make it so the program knows if you have the cursor in the area of the START menu (for example) and if you clicked on it. To tell you the truth, I think that is the main thing that I need help with besides optimization.

SiphonicSugar
« Last Edit: August 12, 2015, 10:56:37 pm by Eeems »
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>

Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
Re: Windows XP in Axe
« Reply #1 on: August 13, 2015, 04:49:34 am »
For the start menu checking thing you have to check if the cursor is in a certain area, so something like
If X>minimumx and (X < maximumx) and (Y > minimumy) and (Y < maximumy)
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

Siphonic_Sugar

• LV3 Member (Next: 100)
• Posts: 51
• Rating: +0/-0
Re: Windows XP in Axe
« Reply #2 on: August 13, 2015, 04:12:41 pm »
Him...I never thought about that... Is there a way to put a getkey phrase on the same line as something else if connected by and?

If getkey(15) and Y(doesn't equal)1

This never works.
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>

Runer112

• Project Author
• LV11 Super Veteran (Next: 3000)
• Posts: 2289
• Rating: +639/-31
Re: Windows XP in Axe
« Reply #3 on: August 13, 2015, 04:16:07 pm »
That's because Axe's order of operations is simply left-to-right. So that's being evaluated like (getKey(15) and Y)≠1. Try adding parentheses, like getKey(15) and (Y≠1), or switching the order, like Y≠1 and getKey(15).

Haobo

• LV2 Member (Next: 40)
• Posts: 27
• Rating: +4/-0
Re: Windows XP in Axe
« Reply #4 on: August 13, 2015, 06:18:01 pm »
some quick help:
Code: [Select]
ClrDrawClrHomeya don't need both if in the end, you're only going to use DispGraph every millisecond, ya can remove ClrHome

Code: [Select]
Line(0,0,95,0        \\Lines for a borderLine(0,63,95,63     \\Line(0,0,63,0         \\Line(95,0,95,63      \\try the rect command, makes it easier to write (and the recti command)

Code: [Select]
Y+1->Y...X-1->Xthey can be Y++ and X--

Here's a big optimization of your code that you might want to do yourself or not, but anyway, it's not too hard to figure out after you experiment a lot. (but I'll leave it up to you if ya wanna use it)
Spoiler For Spoiler:
min(max(getKey(3)-getKey(2)+X+1,1),96)-1->X
min(max(getKey(1)-getKey(4)+Y+1,1),64)-1->Y

this can replace the whole code after the line part
and check this out for some other optimizations
https://www.omnimaga.org/axe-language/the-optimization-compilation/
Projects:
Star Cats
Five Nights at Freddy's
Phoenix Wright

Siphonic_Sugar

• LV3 Member (Next: 100)
• Posts: 51
• Rating: +0/-0
Re: Windows XP in Axe
« Reply #5 on: August 13, 2015, 06:22:59 pm »
Okay, so, obviously when I get a little farther into making this, when you click (2nd) in the bottom left corner, it won't say START (that was just added to see if clicking works), and I'll make an actual start menu pop up.

Code: [Select]
.WINDOWXPFix 532->Y48->XClrHome[E0C0A00000000000]->Pic10->ARepeat getKey(15)Lbl 1ClrDrawIf A=1Text(2,56,"STARTEndPt-On(X,Y,Pic1If getKey(1)Y+1->YEndIf getKey(2)X-1->XEndIf getKey(3)0+1->XEndIf getKey(4)Y-1->YEndIf getKey(54)Goto 2EndDispGraphEndLbl 2If Y>54 and X<251->AEndGoto 1
Why won't this work with the lbls? When I click on the bottom left corner, the mouse stops working correctly and it won't let me press CLEAR to end the program. Oh and Haubo, thanks for the optimization help. I didn't add that yet because I saw your comment after I posted again.

« Last Edit: August 13, 2015, 06:42:31 pm by Siphonic_Sugar »
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>

Haobo

• LV2 Member (Next: 40)
• Posts: 27
• Rating: +4/-0
Re: Windows XP in Axe
« Reply #6 on: August 13, 2015, 06:40:30 pm »

Try not to use any goto's in your program unless you know what you're doing with them. Goto's don't goto a certain part of the code, they also take everything with them, including the stack. It will break the program if not used correctly. What you want to do is create subprograms. (not like you really need them here anyway )
Try this: (I'll change minimally)
Code: [Select]
.WINDOWXPFix 532->Y48->XClrHome[E0C0A00000000000]->Pic10->ARepeat getKey(15)ClrDrawPt-On(X,Y,Pic1If getKey(1)Y+1->YEndIf getKey(2)X-1->XEndIf getKey(3)X+1->XEndIf getKey(4)Y-1->YEndIf Y>54?X<25?getKey(54)Text(2,56,"STARTEndDispGraphEnd
Also, I think you should avoid using and's in the code too for that purpose. and doesn't actually compare it that way, check out the command list for more details. For this, use ?
Projects:
Star Cats
Five Nights at Freddy's
Phoenix Wright

Siphonic_Sugar

• LV3 Member (Next: 100)
• Posts: 51
• Rating: +0/-0
Re: Windows XP in Axe
« Reply #7 on: August 13, 2015, 06:44:38 pm »
Sure, seems like a good idea. Thanks again for optimization.
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>

c4ooo

• Posts: 252
• Rating: +10/-1
• The impossible chemical compound.
Re: Windows XP in Axe
« Reply #8 on: August 13, 2015, 07:01:36 pm »
Here's a big optimization of your code that you might want to do yourself or not, but anyway, it's not too hard to figure out after you experiment a lot. (but I'll leave it up to you if ya wanna use it)
Code: [Select]
min(max(getKey(3)-getKey(2)+X+1,1),96)-1->Xmin(max(getKey(1)-getKey(4)+Y+1,1),64)-1->Y
Grrrr I was about to post the same thing myself. That's why I was asking irc about max()^r. to bad you 'd me.
But as a side note are you sure it won't be better to remove those -1s and change max() to max()^r? I think that will be smaller.  (but i am not sure)
-German Kuznetsov
The impossible chemical compound.

Siphonic_Sugar

• LV3 Member (Next: 100)
• Posts: 51
• Rating: +0/-0
Re: Windows XP in Axe
« Reply #9 on: August 13, 2015, 07:50:39 pm »
Hmm, where is the recti command?
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>

c4ooo

• Posts: 252
• Rating: +10/-1
• The impossible chemical compound.
Re: Windows XP in Axe
« Reply #10 on: August 13, 2015, 08:15:12 pm »
Hmm, where is the recti command?
[2nd][matrix(x^-1)]->math tab-> option 'B'.
-German Kuznetsov
The impossible chemical compound.

Siphonic_Sugar

• LV3 Member (Next: 100)
• Posts: 51
• Rating: +0/-0
Re: Windows XP in Axe
« Reply #11 on: August 13, 2015, 08:35:50 pm »
Okay. Thank you for your help!

Hey, I'm going to set aside this Windows XP project for a minute so I can ask this. I'm thinking about learning 68K basic and maybe a little more on Lua but what calculator do you guys think that I should get next?

1) TI-Nspire CX

2) TI-92 Plus

3) TI-84 Plus CE
« Last Edit: August 13, 2015, 08:40:41 pm by Siphonic_Sugar »
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>

Unicorn

• LV1 Newcomer (Next: 20)
• Posts: 16
• Rating: +0/-0
• I am rainbows
Re: Windows XP in Axe
« Reply #12 on: August 13, 2015, 08:51:05 pm »
I'm going to say CE, because its new, and we need more games/programs for it out and about I might be a biased because of my CSE

Siphonic_Sugar

• LV3 Member (Next: 100)
• Posts: 51
• Rating: +0/-0
Re: Windows XP in Axe
« Reply #13 on: August 13, 2015, 08:55:08 pm »
Haha, I hate the CSE. The CE is almost 8 times faster!
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>

Ivoah

• LV6 Super Member (Next: 500)
• Posts: 336
• Rating: +3/-0
Re: Windows XP in Axe
« Reply #14 on: August 13, 2015, 08:58:35 pm »
Nspire CX (CAS if you can get it) It can run linux so you can really put any programming language on it. It also has Lua built in.
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2 TI SR-56 -$0
TI-Nspire CX CAS - $152 TI-84+ Silver Edition -$56
TI-84+ Silver Edition - $0 TI-85 -$0
TI-73 Explorer VS - $10 ViewScreen -$3