main navigation
::[ Main ]::
About Brutus2D 
Screen Shots 
View Command Set  

Downloads

::[ User Areas ]::
Forum
Topsites
Wiki   
   
 
::[ Support Brutus 2D]::
Register 
 Refer a Friend
affiliates
your site here?
your site here?
link me
your site here?
Commands
(For the latest list of keywords view the help file included in the download)
BASIC Keywords

Keywords

Keyword/Feature Description
Array handling
IsArray Returns True if a variable is an array
Erase Reinitilizes a fixed-size array
LBound Returns the lower bound of an array
UBound Returns the upper bound of an array
Assignments
= Assigns a value to a variable
Let Assigns a value to a variable
Set Assigns an object to a variable
Comments
` Includes inline comments in your script
Rem Includes comments in your script
Constants/Literals
Empty Indicates an uninitialized variable
Nothing Disassociates a variable with an object
Null Indicates a variable with no data
True Boolean True
False Boolean False
Control flow
Do...Loop Repeats a block of statements
For...Next Repeats a block of statements
For Each...Next Repeats a block of statements
If...Then...Else Conditionally executes statements
Select Case Conditionally executes statements
While...Wend Repeats a block of statements
Conversions
Abs Returns absolute value of a number
Asc Returns the ASCII code of a character
AscB Returns the ASCII code of a character
AscW Returns the ASCII code of a character
Chr Returns a character from an ASCII code
ChrB Returns a character from an ASCII code
ChrW Returns a character from an ASCII code
CBool Converts a variant to a boolean
CByte Converts a variant to a byte
CDate Converts a variant to a date
CDbl Converts a variant to a double
Cint Converts a variant to an integer
CLng Converts a variant to a long
CSng Converts a variant to a single
CStr Converts a variant to a string
DateSerial Converts a variant to a date
DateValue Converts a variant to a date
Hex Converts a variant to a hex string
Oct Converts a variant to an octal string
Fix Converts a variant to a fixed string
Int Converts a variant to an integer string
Sgn Converts a variant to a single string
TimeSerial Converts a variant to a time
TimeValue Converts a variant to a time
Dates/Times
Date Returns the current date
Time Returns the current time
DateSerial Returns a date from its parts
DateValue Returns a date from its value
Day Returns day from a date
Month Returns month from a date
Weekday Returns weekday from a date
Year Returns year from a date
Hour Returns hour from a time
Minute Returns minute from a time
Second Returns seconds from a time
Now Returns current date and time
TimeSerial Returns a time from its parts
TimeValue Returns a time from its value
Declarations
Dim Declares a variable
Private Declares script-level private variable
Public Declares public-level public variable
ReDim Reallocates an array
Function Declares a function
Sub Declares a subprocedure
Error Handling
On Error Enables error handling
Err Contains information about last error
Input/Output
InputBox Prompts the user for input
MsgBox Displays a message to the user
Math
Atn Returns the Arctangent of a number
Cos Returns the cosine of a number
Sin Returns the sine of a number
Tan Returns the tangent of a number
Exp Returns the exponent of a number
Log Returns the logarithm of a number
Sqr Returns the square root of a number
Randomize Reseeds the randomizer
Rnd Returns a random number
Operators
+ Addition
- Subtraction
^ Exponentiation
Mod Modulus arithmetic
* Multiplication
/ Division
\ Integer Division
- Negation
& String concatenation
= Equality
<> Inequality
< Less Than
<= Less Than or Equal To
> Greater Than
>= Greater Than or Equal To
Is Compares expressions
And Compares expressions
Or Compares expressions
Xor Compares expressions
Eqv Compares expressions
Imp Compares expressions
Objects
CreateObject Creates reference to an OLE object
IsObject Returns True if object is valid
Options
Option Explicit Forces explicit variable declaration
Procedures
Call Invokes a subprocedure
Function Declares a function
Sub Declares a subprocedure
Strings
Instr Returns index of a string in another
InStrB Returns index of a string in another
Len Returns the length of a string
LenB Returns the length of a string
Lcase Converts a string to lowercase
Ucase Converts a string to uppercase
Left Returns the left portion of a string
LeftB Returns the left portion of a string
Mid Returns the mid portion of a string
MidB Returns the mid portion of a string
Right Returns the right portion of a string
RightB Returns the right portion of a string
Space Pads a string with spaces
StrComp Compares two strings
String Pads a string with a character
Ltrim Removes leading spaces from a string
Rtrim Removes trailing spaces from a string
Trim Removes leading and trailing spaces
Variants
IsArray Returns True if variable is an array
IsDate Returns True if variable is a date
IsEmpty Returns True if variable is  
IsNull Returns True if variable is null.
IsNumeric Returns True if variable is a number
IsObject Returns True if variable is an object
VarType Indicates a variable's type

Brutus 2D Keywords

 

Graphics

~~~~~~~~~~~

General

Initialize ([width], [height],[windowed])

Terminate

Clear([color]) -- default is black

Display -- draws all graphics that have been set to the buffer to the visible screen

SetTitle(title) -- sets the text in the caption of a windowed display

SetIcon(filename) -- sets the icon in the caption of a windowed display

CreateFont(FontName, size, [Bold], [Italic], [Underline]) - returns a font index to the font created

SetText(text, x, y, Font, [Red], [Green], [Blue], [Alpha]) - draws text at x, y using Font index to the buffer

Screenshot(Filename) -- from a FullScreen display, save a screenshot to the specified Filename

FPS -- returns the Frames per Second

Image

Loadimage(filename, [colorkey]) -- loads a graphic image from a file, returns its image index

Cloneimage(image) -- duplicate a previously loaded image, this saves memory

SetImage(image) -- draws the image to the buffer

SetVisible(image,x) -- default is true

SetX(image,x) -- positions the image in the x-axis

SetY(image,Y) -- positions the image in the y-axis

SetXY(image, X, Y) --

SetR(image, Red) -- sets the images color RED value

SetG(image, Green) -- sets the images color Green value

SetB(image, Blue) -- sets the images color Blue value

SetAngle(image, radians) -- sets the image rotation

SetAlpha(image, alpha) -- sets the image transparency

SetScaleX(image, scalex) -- sets the size (stretch or shrink) in the x-axis, negative numbers flip it

SetScaleY(image, scaley) -- sets the size (stretch or shrink) in the y-axis, negative numbers flip it

SetRows(image, rows) -- number of rows in an image strip

SetCols(image, columns) -- number of columns in an image strip

SetTotalFrames(image, totalframes) -- number of images in an image strip (because it is not always rows*cols)

SetCurrentFrame(image, currentFrame) -- current image in the image strip

SetAnimated(image, True or False) -- enable animated image strip

SetFrameHeight(image, frameheight) -- image height in an image strip

SetFrameWidth(image, framewidth) -- image width in an image strip

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

System

~~~~~~

 .

Pause(mseconds) -- waits so many milliseconds

ProcessMessages --

DebugPrint --

GetWindowState -- returns 0 = normal, 1 = minimized, 2 = maximized

GetTime -- returns time in ticks

File

ex. of filename = "C:\test.txt"

FileAppend(Filename, Text) --

FileCopy(Filename1, Filename2) -- returns 0 if error

FileDelete(Filename) -- returns 0 if error

FileRead(Filename) -- returns data

FileWrite(Filename, Data) --

FileExists(Filename) -- returns 0 if not exist

FileSize(Filename) -- returns value

Folder

ex. of Foldername = "C:\mydir"

FolderExists(Foldername) -- returns 0 if not exist

FolderCreate(Foldername) --

FolderDelete(Foldername) -- returns 0 if fail

INI

ex. of filename = "C:\test.ini"

ex. of section = "colors"

ex. of key = "background"

ex. of setting = "&hFFFFFFFF"

IniGetSetting(Filename, section, key) -- returns data

IniDelete(Filename) --

IniSaveSetting(Filename, section, key, setting) -- n.b. Creates if does not already exist

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

FX (particle effects)

~~~~

loadimage(filename) -- loads the image of the particle to use, returns an index to an FX

SetPArticles FXIndex, number of particles -- the FX and how many particle to use

SetXY FXIndex, x, y -- the FX index and the x and y location of the FX

Initialize FXIndex, FXType ,size -- the FX index, the type of FX (fire, thrust, smoke, rain, snow, explode, custom), size of particle

SetFX FXIndex -- draws the FX to the back buffer, place after graphics.clear

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Key

~~~

Initialize --

Terminate --

Pressed(keycode) --

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mouse

~~~~~

Initialize --

Terminate --

dX --

dY --

dZ --

LeftButton --

RightButton --

MiddleButton --

Update --

x --

y --

Hide --

Show --

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Music

this is for playing a .mid file

~~~~~

Initialize --

Terminate --

CurrentTimeTicks(musicID) -- returns current ticks

CurrentTimeSeconds(musicID) -- returns seconds

LoopPlay(musicID, True or False) --

StartPosition(musicId, tickcount) -- sets where to start

PlayLengthTicks(musicID) --

PlayLengthSeconds(musicID) --

TempoModifier(value) -- sets the tempo

Tempo(musicID) -- gets the tempo

TimeSignature(musicID) --

playmidi(musicID) --

loadmidi(filename) -- returns the file's musicID

pausemidi(musicID) --

clearmidi(musicID) --

clearallmidi() --

stopmidi(musicID) --

GetVolume() -- returns value for all midi's

SetVolume(value) -- sets the volume for all midi's

~~~~~~~~below is for MP3 files ~~~~~~~~~~~~~~~~~~~

LoadMP3(FileName)

PauseMP3()

PlayMP3()

SetMP3Balance(Value)

SetMP3Speed(Value)

SetMP3Volume(Value)

StopMP3()

TerminateMP3()

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sound

this is for .wav files

~~~~~

Initialize --

Terminate --

LoadWav filename -- returns index to sound

PlayWav index --

StopWav index --

PauseWav index --

clearWav index -- frees the memory of that sound

clearallWav() -- frees memory of all loaded sounds

SetvolumeWav index, volume% --

GetvolumeWav(index) -- returns value

GetStatus(index) -- returns "Looping", "Playing", or "Buffer Lost"

GetFrequency(index) -- returns value

SetFrequency index, value -- try values from 2000 to 20000 for fun

Getposition(index) -- returns the current playing position

Setposition index, value -- sets the current playing position

Getpan(index) -- returns the current pan value, default = 0 which is centered

Setpan index, value -- sets the current pan value

SetLoopPlay index, value - value = True cause indexed wav to continuously play

 

 

Requirements

You NEED the following:

° Graphics card with 3D support (hardware support recommended, but software support will work, only slower)

° Microsoft DirectX 8.1 or Newer properly installed

° Microsoft Windows XP or Windows 2000


(Microsoft Windows Me, 98, or 95 MAY work if they have all the latest service packs installed including Microsoft Internet Explorer 4.0 or newer.  Try it and see, but I make no guarantee)

 
 
weekly poll
What do you think of my site?

Excellent!
Yeah it's good
I guess it's OK
I really hate it!

site stats
Today's Unique: 123
Best Unique Day: 123
Total Unique: 246
Total Page Views: 1020
Total Online: 5
Online Record: 11
Forum Members: 123
recent portfolio
Free Templates by zymic.com