Create Image query

BlitzPlus Forums/BlitzPlus Beginners Area/Create Image query

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm curious how you can put a CreateImage in a type without
making the CreateImage Global. Should I merely put the image in a bank, then PeekInt for it when I require it in
the type.
For Example:
Graphics 640,480
gamebank=CreateBank(12)
PokeInt gamebank,0,Rect(MouseX,MouseY,50,100,1)=bat=CreateImage(50,100,0)
PokeInt gamebank,4,Oval(ball\x,ball\y,20,20,0)=ball=CreateImage(20,20,0)
PokeInt gamebank,8,Rect(enemy\x,enemy\y,50,100,0)=bat2=CreateImage(50,100,0)
;Types
Type Player
	Field x,y,bat
End Type
bat1=New Player
bat1\x=MouseX
bat1\y=MouseY
bat1\bat=PeekInt(gamebank,0)
Type Enemy
	Field x,y,bat2
End Type
antagonist=New Enemy
antagonist\x=500
antagonist\y=240
antagonist\bat2=PeekInt(gamebank,4)
Type ball
	Field x,y,ball
End Type
bally=New ball
bally\x=320
bally\y=240
bally\ball=PeekInt(gamebank,8)

Did I do this right?