Neatening Types.

BlitzPlus Forums/BlitzPlus Programming/Neatening Types.

Just been getting my source code to display my bitmap files in the right clocations, got that working but it appears to be longer than it should be. Any suggestions for shortening the source code?, or do I have to do it this way:

AppTitle "BreakIn! (beta)"

Local ScreenWidth = 180
Local ScreenHeight = 182
Graphics ScreenWidth,ScreenHeight,32,2

Type Pad
Field X
Field Y
End Type

PadFileName = LoadImage("Pad.bmp")

Pad.Pad = New Pad
Pad\X = 135
Pad\Y = 67

Type Ball
Field X
Field Y
End Type

BallFileName = LoadImage("Ball.bmp")

Ball.Ball = New Ball
Ball\X = 127
Ball\Y = 90

Type WideScreen
Field X
Field Y
End Type

WSFileName = LoadImage("WideScreen.bmp")

WideScreen.WideScreen = New WideScreen
WideScreen\X = 0
WideScreen\Y = 0

WideScreen.WideScreen = New WideScreen
WideScreen\X = 167
WideScreen\Y = 0

Type Box
Field X
Field Y
End Type

BoxFileName = LoadImage("Box.bmp")

Box.Box = New Box
Box\X = 45
Box\Y = 15

Box.Box = New Box
Box\X = 45
Box\Y = 30

Box.Box = New Box
Box\X = 45
Box\Y = 45

Box.Box = New Box
Box\X = 45
Box\Y = 60

Box.Box = New Box
Box\X = 45
Box\Y = 75

Box.Box = New Box
Box\X = 45
Box\Y = 90

Box.Box = New Box
Box\X = 45
Box\Y = 105

Box.Box = New Box
Box\X = 45
Box\Y = 120

Box.Box = New Box
Box\X = 45
Box\Y = 135

Box.Box = New Box
Box\X = 45
Box\Y = 150

Box.Box = New Box
Box\X = 60
Box\Y = 15

Box.Box = New Box
Box\X = 60
Box\Y = 30

Box.Box = New Box
Box\X = 60
Box\Y = 45

Box.Box = New Box
Box\X = 60
Box\Y = 60

Box.Box = New Box
Box\X = 60
Box\Y = 75

Box.Box = New Box
Box\X = 60
Box\Y = 90

Box.Box = New Box
Box\X = 60
Box\Y = 105

Box.Box = New Box
Box\X = 60
Box\Y = 120

Box.Box = New Box
Box\X = 60
Box\Y = 135

Box.Box = New Box
Box\X = 60
Box\Y = 150

MaskImage WSFileName,250,250,250
MaskImage BoxFileName,250,250,250
MaskImage PadFileName,250,250,250
MaskImage BallFileName,250,250,250

ClsColor 250,250,250

SetBuffer BackBuffer()

While Not KeyDown(1)

Cls

For WideScreen.WideScreen = Each WideScreen
DrawImage WSFileName,WideScreen\Y,WideScreen\X
Next

For Box.Box = Each Box
DrawImage BFilename,Box\Y,Box\X
Next

DrawImage PFileName,Pad\Y,Pad\X

DrawImage BallFileName,Ball\Y,Ball\X

Flip

Wend
End

I know it's abit long. :\