This file tells you how to program in sonicpro.exe

I have included 3 example programs that can be used with sonicpro.exe.
They are mousecon.txt, tex.txt and noloop.txt. To load them, run 
sonicpro.exe. Once you have loaded a level, press ~ to open the
console. Type in the console "load " followed by the name of the
program you would like to load, but not the extension.
  eg; to load mousecon.txt, you would type
       load mousecon
once it is loaded, use pgup and pgdn to navigate through the console.
to run the program, find the word run and press enter.
 Write your own programs and submit them to prodigy_2000@start.com.au
If you have any problems, feel free to forward questions to that
adress.
The following is a list of basic commands that can be used with
the sonicX-treme console. The information here is very important as
many of the commands are not the same as they are in qbasic.
--------------------------------------------------------------------
COMMAND        'Explanation of command
--------------------------------------------------------------------
start          'specifies where to start program execution
end            'specifies where to end program execution
run            'this command will begin program execution
doevents       'this command is very important. You will notice that
               'it is possible to control the speed of execution of
               'the program you make by using the variable steps!.
               'sonicx will wait steps! * 1 second between executing
               'lines of code. In the interim, control is past to
               'the other subs in sonicx. When steps! = 0, control is
               'not automatically given to the "game subs" in sonicx,
               'and as such the graphics wont update to the screen, so
               'in effect, it looks like the game has frozen. This is
               'where doevents comes in. Doevents forces sonicX to
               'break the execution of your program and to carry out
               'necesarry game functions. It then returns control
               'back to your program. examples of this are in
               'mousecon.txt and tex.txt
open file.txt for input 'opens a file for input
input var1!    'allows you to access a value from a file opened
               'for input, with the value stored in the variable
               'adjacent to input. ie; var1!.
do...loop until'a control flow statement that repeats a block 
               'of statements until a condition becomes true.
               'Doesn't allow "while" statement. It will not loop
               'if a condition such as "loop until x > 0" isn't
               'specified. This is too prevent a cascading recursion.
if...then      'a control flow statement that allows conditional
               'execution or branching, based on the evaluation of
               'an expression that must be either true or false
               'doesn't allow "else", or "end if". It can only be done
               'on one line. Allows one of "and", "or", "xor" in each
               'expression. Only allows three words after "then". 
gosub...return 'a control flow statement that branches to, and
               'returns from, a subroutine. Gosub will go to a 
               'line label
line label     'a line label is a single line with a word and a ":"
               'next to it. Eg, hello: is a line label
print          'prints a string of data to the screen. This is a
               'little bit different to qbasic's print in that
               'it doesn't require a ";" between a string and a
               'variable. eg, print "levelx" dx% "levely" dy% . Print
               'is controlled by 3 variables, with printx% and printy%
               'controlling the x and y location of the message 
               'being printed, and printc% controls the colour of the text.
save           'saves the text in the console to a text file. It will
               'save each line between the printstart command and the 
               'printend command.
load           'loads the contents of a text file into the console. It 
               'will print the file, line by line into the console,
               'overwriting any lines that are in it's way. ie; type
               ' load mousecon for mouse control in sonicx
printstart     'specifies where that save command will start saving
               'from 
printend       'specifies where that save command will stop saving
               'from 
expressions    'variable1 = variable1 + variable2
               'variable1 = variable1 - variable2
               'variable1 = variable1 * variable2
               'variable1 = variable1 / variable2
               'variable1 = variable2
               'variable1 = number is the same as variable1 number
variables      'unfortunately, you can not declare any variables in
               'this console version of qbasic, but there are many
               'variables already declared that you can use. The 
               'following list contains the variables, and an 
               'explanation of how they can be used.
variable list
-----------------------------------------------------------------------
Variable       : Function
-----------------------------------------------------------------------
x%             :controls the location of the sprite on the x-axis
y%             :controls the location of the sprite on the y-axis
dx%            :controls the location of the sprite, relative to the
               :level on the x-axis
dy%            :controls the location of the sprite, relative to the
               :level on the y-axis   
jumpp%         :if jumpp% = 1, the sprite will jump into the air.
speed!         :controls the speed of the sprite, in pixels per frame
accelerate!    :controls the acceleration of the sprite, in pixels per
               :frame
speedvar!      :controls the decceleration of the sprite, in pixels per
               :frame
iniy%          :controls the value of y% that the sprite will tend
               :towards over time
jumpdown%      :When jumpdown% =1, if sonic falls into, or sonic jumps
               :into a platform, then the sprite will walk along the
               :platform. When jumpdown% = 0, the sprite will ignore 
               :that the platform exists.
jumpspeed!     :As the sprite is jumpping, this variable specifies the
               :speed of the sprite in the y direction in pixels per 
               :frame. Note that as the sprite is jumpping, this 
               :variable will be constantly changing.
ac%            :if ac% = 0 then all of the tiles in the foreground 
               :layer will be hidden. If ac% = 1, they will be shown.
eac%           :if eac% = 0 then all of the tiles in the endground 
               :layer will be hidden. If eac% = 1, they will be shown.
mac%           :if mac% = 0 then all of the tiles in the midground 
               :layer will be hidden. If mac% = 1, they will be shown.
bac%           :if bac% = 0 then all of the tiles in the background 
               :layer will be hidden. If bac% = 1, they will be shown.
inispeed       :specifies the maximum value that speed! can reach. If
               :speed! is greater then inispeed, it will limited to
               :the value of inispeed.
downn%         :if downn% = 1, then sonic will roll.
col%           :if col% = 1, then sonic will look towards the right. If
               :col% = 2, then sonic will look towards the left.
levellimit%    :specifies a value on the levelx axis that the sprite
               :can't go less then 
levellimit2    :specifies a value on the levelx axis that the sprite
               :can't go more then 
obj%           :if obj% = 0 then all objects will be hidden. If obj% 
               : = 1 then all objects will be shown
spiker%        :if spiker% = 1 then collision detection for spike mode
               :will be off. If spiker% = 0, the detection will be on
grad%          :if grad% = 1 then collision detection for hill mode
               :will be off. If grad% = 0, the detection will be on
zero%          :if zero% = 1 then collision detection for zero gradient
               :mode will be off.If zero% = 0 the detection will be on
gravity%       :if gravity% = 0, when the sprite walks off a platform,
               :the sprite will not fall. If gravity% = 1, the converse
               :is true
wall%          :if wall% = 1 then collision detection for wall mode
               :will be off. If wall% = 0, the detection will be on
fixfps%        :if fixfps% = 1, then the max fps will be restricted to
               :20 fps. If fixfps% = 0 then max fps is dependant on
               :your hardware
timec!         :if fixfps% = 1 then timec! = 1/(number of fps desired)
               :so if you want an fps of 20, timec! = 0.025.
start          :specifies at what line the run command should begin
               :execution of a console program
end            :specifies at what line the run command should end
               :execution of a console program
printstart     :specifies at what line the save command should begin
               :saving console text
printend       :specifies at what line the save command should end
               :saving console text
run            :this command will run a console script
steps!         :specifies the amount of time that the console should
               :wait in executing a line of code in a program
mouseon%       :if mouseon% = 0, then the mouse will be hidden. If 
               :mouseon% = 1, then the mouse will be shown.
adx%           :specifies the value of the mouse's x-axis
adx%           :specifies the value of the mouse's y-axis
var1!          :this variable is for your own use
var2!          :this variable is for your own use
var3!          :this variable is for your own use
var4!          :this variable is for your own use
printx%        :specifies where a message may be printed on the x axis
printy%        :specifies where a message may be printed on the y axis
printc%        :specifies the colour of a message that may be printed