Author Topic: Axe - The 'Fix ' Command  (Read 6860 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Axe - The 'Fix ' Command
« on: February 20, 2011, 03:22:32 pm »
Introduction

Axe has a command called 'Fix ' with many uses. It's really simple to use and everything is explained in the commands.htm included in Axe. However, this tutorial makes it simpler to understand the several options of 'Fix ' command with examples and explanation.

The Fix command is always followed by a number, and it activates a new feature or changes something, and there is always another Fix that cancels it.

Note: I'm explaining from Fix 0 to Fix 5, I'll explain the others later.

Fix 0 and Fix 1

Code: [Select]
.FIX
ClrHome
Text(0,0,"Small font
Fix 1
Text(0,10,"Big Font
Fix 0
Repeat getKey
End

Whenever, Fix 1 is called, it activates 8 pixels size font. When Fix 0 is called it makes it the default.

This is what happens when I compile and run this code:



This command is similar to the difference in TI-Basic:

Output(0,0,"TEXT
Text(10,0,"TEXT

Fix 3 and Fix 2

The Fix 3 command makes text inverted:

Code: [Select]
.FIX
ClrHome
Text(0,0,"Normal text
Fix 3
Text(0,10,"Inverted text
Fix 2
Repeat getKey
End



This is a very simple command to understand, I think.

Fix 5 and Fix 4

Now, this is one of the most important Fix's in my opinion. It lets you have text and images/sprites at the same time in the LCD.

Here's an example:

Code: [Select]
.FIX
ClrDraw
[181818FFFF181818]->Pic1
Fix 5
Pt-On(20,20,Pic1
Text(0,0,"Image and text
DispGraph
Repeat getKey
End
Fix 4

This is very useful for menus, games and most programs use it.



Conclusion

I hope you liked the tutorial, if you have any questions, comment or PM me.

Attachments

Attached is a ZIP with the three 8xp source codes and executables and the screenshots.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Axe - The 'Fix ' Command
« Reply #1 on: February 20, 2011, 03:34:36 pm »
Cool I guess. But isn't this, like you said, in the documentation? I don't think we should be flooding the forum with tutorials on stuff that can be easily found after a few seconds of experimenting, or merely through flipping through the commands list

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe - The 'Fix ' Command
« Reply #2 on: February 20, 2011, 03:36:42 pm »
Cool I guess. But isn't this, like you said, in the documentation? I don't think we should be flooding the forum with tutorials on stuff that can be easily found after a few seconds of experimenting, or merely through flipping through the commands list

But isn't this, like you said, in the documentation?

I don't really get this sentence, but when I joined Omnimaga and started learning Axe, I had to do it on the IRC and it's not easy to understand stuff. I like it to be many tutorials and guides for Axe newcomers.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Axe - The 'Fix ' Command
« Reply #3 on: February 20, 2011, 06:59:44 pm »
This command is similar to the difference in TI-Basic:

Output(0,0,"TEXT
Text(10,0,"TEXT
I believe you mean this:
Output(0,0,"TEXT
Text(-1,10,0,"TEXT

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe - The 'Fix ' Command
« Reply #4 on: February 20, 2011, 07:26:19 pm »
This command is similar to the difference in TI-Basic:

Output(0,0,"TEXT
Text(10,0,"TEXT
I believe you mean this:
Output(0,0,"TEXT
Text(-1,10,0,"TEXT
I believe you mean this:
Output(1,1,"TEXT
Text(-1,10,0,"TEXT

;)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Axe - The 'Fix ' Command
« Reply #5 on: February 20, 2011, 07:27:32 pm »
This command is similar to the difference in TI-Basic:

Output(0,0,"TEXT
Text(10,0,"TEXT
I believe you mean this:
Output(0,0,"TEXT
Text(-1,10,0,"TEXT
I believe you mean this:
Output(1,1,"TEXT
Text(-1,10,0,"TEXT

;)
I believe you mean this:
Text(0,0,"TEXT
Text(-1,10,0,"TEXT

O0

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe - The 'Fix ' Command
« Reply #6 on: February 20, 2011, 07:31:07 pm »
This command is similar to the difference in TI-Basic:

Output(0,0,"TEXT
Text(10,0,"TEXT
I believe you mean this:
Output(0,0,"TEXT
Text(-1,10,0,"TEXT
I believe you mean this:
Output(1,1,"TEXT
Text(-1,10,0,"TEXT

;)
I believe you mean this:
Text(0,0,"TEXT
Text(-1,10,0,"TEXT

O0
I believe I'm not actually sure what was trying to be said in the first place

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe - The 'Fix ' Command
« Reply #7 on: February 21, 2011, 07:19:02 am »
Hum, I meant the difference, in TI-Basic between Text( And Output(/Disp

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe - The 'Fix ' Command
« Reply #8 on: February 21, 2011, 10:34:01 am »
Hum, I meant the difference, in TI-Basic between Text( And Output(/Disp

Or Text(-1 ;) That draws large text on the graph screen.

Cool I guess. But isn't this, like you said, in the documentation? I don't think we should be flooding the forum with tutorials on stuff that can be easily found after a few seconds of experimenting, or merely through flipping through the commands list

But isn't this, like you said, in the documentation?

I don't really get this sentence, but when I joined Omnimaga and started learning Axe, I had to do it on the IRC and it's not easy to understand stuff. I like it to be many tutorials and guides for Axe newcomers.

We don't want to come up with so many that they don't even bother to read the readme PDF, though. That's the most important one by far. But nice explanation here :)