sorry i don't know if already asked!
if i use framework to reduce the exe size the compiler give me errors...
prg sample...
-----------------------------------------
Strict
framework brl.max2d
framework brl.random
Graphics 640, 480, 32
Const MaxStar: Int = 30
Type tStar
Field X, Y : Int
Field Speed, Angle : Float
EndType
Global Stars: tStar[MaxStar]
Global StarSprite: tImage
StarSprite = LoadImage("Star.png", MASKEDIMAGE)
MidHandleImage StarSprite
SeedRnd MilliSecs()
For Local j:Int = 0 To MaxStar-1
Stars[j] = New tStar
Stars[j].X = Rand(0, 639)
Stars[j].Y = Rand(0, 479)
Stars[j].Angle = Rand(0, 360)
Stars[j].Speed = Rand(1, 3.5)
Next
While Not KeyHit(KEY_ESCAPE)
Cls
For Local J:Int = 0 To MaxStar-1
Stars[j].Angle :+ Stars[j].Speed
Stars[j].y :+ Stars[j].Speed
SetRotation Stars[j].Angle
DrawImage StarSprite, Stars[j].X, Stars[j].Y
If Stars[j].Y > 544 Then
stars[j].Y = -64
Stars[j].X = Rand(0, 639)
EndIf
If Stars[j].Angle > 360 Then Stars[j].Angle = 0
Next
Flip
Wend
End
---------------------------------------------------------
if i use framework to reduce the exe size the compiler give me errors...
prg sample...
-----------------------------------------
Strict
framework brl.max2d
framework brl.random
Graphics 640, 480, 32
Const MaxStar: Int = 30
Type tStar
Field X, Y : Int
Field Speed, Angle : Float
EndType
Global Stars: tStar[MaxStar]
Global StarSprite: tImage
StarSprite = LoadImage("Star.png", MASKEDIMAGE)
MidHandleImage StarSprite
SeedRnd MilliSecs()
For Local j:Int = 0 To MaxStar-1
Stars[j] = New tStar
Stars[j].X = Rand(0, 639)
Stars[j].Y = Rand(0, 479)
Stars[j].Angle = Rand(0, 360)
Stars[j].Speed = Rand(1, 3.5)
Next
While Not KeyHit(KEY_ESCAPE)
Cls
For Local J:Int = 0 To MaxStar-1
Stars[j].Angle :+ Stars[j].Speed
Stars[j].y :+ Stars[j].Speed
SetRotation Stars[j].Angle
DrawImage StarSprite, Stars[j].X, Stars[j].Y
If Stars[j].Y > 544 Then
stars[j].Y = -64
Stars[j].X = Rand(0, 639)
EndIf
If Stars[j].Angle > 360 Then Stars[j].Angle = 0
Next
Flip
Wend
End
---------------------------------------------------------