32 bits Impacto - Beta Release


THIS SOFTWARE USES SHAWN HARGREAVES ALLEGRO LYBRARY!


Now, Impacto is 2 times faster and 4 times shorter than before, and have new built-in functions.


Here you find available for download the 32 bits interpreter Impacto, for those programmers that want a powerful tool to develop your programs, without the difficulty imposed by C and without the slowness of Basic.
Main features:
Fast development
Mathematical functions
Built-in multimedia functions
Superior speed to most of the existent interpreters
32 bits - Run in DOS, Win3x, Win95 and Win98
Automatic variables and arrays
Special to develop games and multimedia applications
No memory limits
Clear and concise language
Mouse functions
You can write yor own functions!
Include files
Pictures and ' sprites '
More examples

Additional information and download

The files impacto.zip and examples.zip contains the interpreter and examples texts files. Download the files to a directory to your choice, and run the example programs with impacto.exe 'filename'.
The allegro.zip is the allegro help file. Allegro functions and Impacto functions are more or less the same. You can use then to understand how to call impacto routines.


Overview:

1. Open Notepad or another text editor, and type:

print("Hello Word")
end()

save as hello.imp, for example.
In the command line (or Start, Run in win95), type impacto hello.imp
and you see in your screen the words "Hello, Word" !

2. Now, type in notepad:

abc = 20
def = 40
x = abc + def
print("x is " x)
end()

Save and run, and you see "x is 60".

3. Now, type in notepad:

a = 20
d = 40
x = a + d
y = a * d
z = d / a
w = d - a
print("x is " x "\n")
print("y is " y "\n")
print("z is " z "\n")
print("w is " w )
end()

or type direct

print("x is " a+d "\n")
print("y is " a*d "\n")
print("z is " d/a "\n")
print("w is " d-a )
end()

Save and run, and you see
"x is 60"
"y is 800"
"z is 2"
"w is 20"

4. Now, graphics and sound:

//turn into mode 19 (decimal) or 13 (hex)
//install timer
//install keyboard handler
//install sound

graphics(19)
timer()
keyboard()
sound()

//you can assign sound files to variable

dead = loadwav("dead.wav")
life = loadwav("life.wav")

//and music files

music=loadmidi("chase.mid")

//and play then
//playwav(sound file, volume (0-255), pan position(0-255) -> left, right, frequency, loop)

playwav(dead,255,255,1000,0)

//playmidi(music file, loop) (-1 means infinite)

playmidi(music, -1)

//now, put image on background
//first, create a memory area

background=create_image(320,200)

//clear memory

clear_mem(background)

//now, draw a rectangle in memory
//our memory is 'background', remeber ?
//retangulo_mem(where_to_draw, left, top, right, bottom, color) )

rectangle_mem(background, 10, 10, 310, 190, 50)

//you can draw horizontal and vertical lines, circles, etc
//in memory or direct to screen
//linhorz_mem(where-to-draw, left, top, right, color )

linhorz_mem(background, 10, 10, 50, 50)

//if you want draw in screen, use:
//linhorz(left, top, right, color )

//you can write text direct to memory or screen

formatedtextout_mem("Score: %d",background,score, 20,0,20)

//now, waits for a vertical retrace to begin

vsync()

//and show image on the screen and clear backgorund

copy_image(background,-1,0,0,0,0,320,200)
clear_mem(background)

//when you finish the game, return to text graphics mode

graphics(3)

//do not forget to write the end() command, or you will have trouble.

end()

See examples.zip for more examples


Attention:

This program is an beta release. I will not be held responsable for any damage caused by the use or mis-use of this program. You may distribute this program as long as it is in its original form and none of the accompanying files are altered and that it is provided free of charge, with the exception of transport costs, etc. *****YOU WILL USE THIS AT YOUR OWN RISK***** However I believe that it is stable enough for no problems to occurr.


Trouble, criticism, doubt, comments, suggestions, etc, can be sent to:
winning@escelsanet.com.br

Copyright ©1999, Mestre, Last update - 25/04/2002 13:27:00