
#macro rgbaR ( n )

		( (n and &hFF0000 ) shr 16 )

#endmacro

#macro rgbaG ( n )

		( (n and &hFF00 ) shr 8 )

#endmacro

#macro rgbaB ( n )

		( n and &hFF )

#endmacro

#macro rgbaA ( n )

		( (n and &hFF000000 ) shr 24 )

#endmacro

Const NULL As Any Ptr = 0

#Define EQU =
#Define GTR >
#Define LSS <
#Define NEQ <>
#Define GEQ >=
#Define LEQ <=

rem :: #Define << SHL
rem :: #Define >> SHR

rem :: #Define !== NEQ
rem :: #Define == EQU

Const EMPTY = ""

Const CR = Chr ( 13 )
Const LF = Chr ( 10 )
Const SP = Chr ( 32 )

Const ESC = Chr ( 27 )
Const BKSP = Chr ( 8 )
Const HTAB = Chr ( 9 )

Const CRLF = CR & LF
Const EQ = Chr ( 61 )
Const DEL = Chr ( 127 )

Const QUOT = Chr ( 34 )
Const COMMA = Chr ( 44 )
Const COLON = Chr ( 58 )
Const SEMI = Chr ( 59 )

Const VARSEP = COLON & COLON 

CONST TotalDay = 86400
CONST GreyDither = &H5555

#Include Once "file.bi"
#Include Once "crt/math.bi"
#Include Once "crt.bi"

Const Pi = 4 * Atn ( 1 )

Const MouseCloseEvent = Chr ( 255, 107 )

Const LEFTBUTTON = 1
Const MIDDLEBUTTON = 4
Const RIGHTBUTTON = 2
Const SHOWMOUSE = 1
Const HIDEMOUSE = 0

Const LEFTARROW = CHR(255,75)
Const RIGHTARROW = CHR(255,77)
Const UPARROW = CHR(255,72)
Const DOWNARROW = CHR(255,80)

#include once ".\KSDK\Support\frequent numerics const.bi"

Dim Shared As String CI

Dim Shared As Long CurrentX = 0, CurrentY = 0, MouseButtons = 0

ReDim Shared As String CMD ( Any )

Dim As Long CmdIndex = 0 : Do
	
	If Command ( CmdIndex ) = EMPTY Then Exit Do
	
	ReDim Preserve CMD ( 0 To CmdIndex )
	CMD ( CmdIndex ) = Command ( CmdIndex )
	
	CmdIndex += 1
	
Loop

rem :: #Include Once "./Constants.bi"

rem :: #Include Once "./General Includes.bi"

#Include Once "fbgfx.bi"
#Include Once "fbImage.bi"
#Include Once "vbcompat.bi"

'ScreenRes 640, 480, 32 , , FB.GFX_ALPHA_PRIMITIVES
'ScreenSet 1, 0
