	format	MS COFF
	extrn	___bb_blitz_blitz
	extrn	___bb_polledinput_polledinput
	extrn	___bb_system_system
	extrn	__bbExEnter
	extrn	_bbArraySlice
	extrn	_bbDelay
	extrn	_bbEmptyArray
	extrn	_bbExEnter
	extrn	_bbExLeave
	extrn	_bbExThrow
	extrn	_bbGCFree
	extrn	_bbMilliSecs
	extrn	_bbNullObject
	extrn	_bbObjectClass
	extrn	_bbObjectCompare
	extrn	_bbObjectCtor
	extrn	_bbObjectDowncast
	extrn	_bbObjectFree
	extrn	_bbObjectRegisterType
	extrn	_bbObjectReserved
	extrn	_bbObjectSendMessage
	extrn	_bbObjectToString
	extrn	_bbOnEnd
	extrn	_bbStringClass
	extrn	_bbStringConcat
	extrn	_bbStringFromInt
	extrn	_brl_blitz_NullMethodError
	extrn	_brl_hook_AllocHookId
	extrn	_brl_hook_RunHooks
	extrn	_brl_polledinput_DisablePolledInput
	extrn	_brl_polledinput_EnablePolledInput
	extrn	_brl_system_MoveMouse
	public	___bb_graphics_graphics
	public	__brl_graphics_TGraphicsDriver_Delete
	public	__brl_graphics_TGraphicsDriver_New
	public	__brl_graphics_TGraphicsMode_Delete
	public	__brl_graphics_TGraphicsMode_New
	public	__brl_graphics_TGraphicsMode_ToString
	public	__brl_graphics_TGraphics_Delete
	public	__brl_graphics_TGraphics_New
	public	__brl_graphics_TGraphics__pad
	public	_brl_graphics_AttachGraphics
	public	_brl_graphics_BumpGraphicsSeq
	public	_brl_graphics_CloseGraphics
	public	_brl_graphics_CountGraphicsModes
	public	_brl_graphics_CreateGraphics
	public	_brl_graphics_DefaultGraphicsFlags
	public	_brl_graphics_EndGraphics
	public	_brl_graphics_Flip
	public	_brl_graphics_FlipHook
	public	_brl_graphics_GetGraphicsDriver
	public	_brl_graphics_GetGraphicsMode
	public	_brl_graphics_Graphics
	public	_brl_graphics_GraphicsDepth
	public	_brl_graphics_GraphicsFlags
	public	_brl_graphics_GraphicsHeight
	public	_brl_graphics_GraphicsHertz
	public	_brl_graphics_GraphicsModeExists
	public	_brl_graphics_GraphicsModes
	public	_brl_graphics_GraphicsSeq
	public	_brl_graphics_GraphicsWidth
	public	_brl_graphics_SetGraphics
	public	_brl_graphics_SetGraphicsDriver
	public	_brl_graphics_TGraphics
	public	_brl_graphics_TGraphicsDriver
	public	_brl_graphics_TGraphicsMode
	section	"code" code
___bb_graphics_graphics:
	push	ebp
	mov	ebp,esp
	cmp	dword [_152],0
	je	_153
	mov	eax,0
	mov	esp,ebp
	pop	ebp
	ret
_153:
	mov	dword [_152],1
	call	___bb_blitz_blitz
	call	___bb_system_system
	call	___bb_polledinput_polledinput
	push	_brl_graphics_TGraphics
	call	_bbObjectRegisterType
	add	esp,4
	push	_brl_graphics_TGraphicsMode
	call	_bbObjectRegisterType
	add	esp,4
	push	_brl_graphics_TGraphicsDriver
	call	_bbObjectRegisterType
	add	esp,4
	mov	eax,dword [_133]
	and	eax,1
	cmp	eax,0
	jne	_134
	call	_brl_hook_AllocHookId
	mov	dword [_brl_graphics_FlipHook],eax
	or	dword [_133],1
_134:
	mov	eax,0
	jmp	_41
_41:
	mov	esp,ebp
	pop	ebp
	ret
__brl_graphics_TGraphics_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_brl_graphics_TGraphics
	mov	eax,0
	jmp	_44
_44:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_graphics_TGraphics_Delete:
	push	ebp
	mov	ebp,esp
_47:
	mov	eax,0
	jmp	_154
_154:
	mov	esp,ebp
	pop	ebp
	ret
__brl_graphics_TGraphics__pad:
	push	ebp
	mov	ebp,esp
	mov	eax,0
	jmp	_50
_50:
	mov	esp,ebp
	pop	ebp
	ret
__brl_graphics_TGraphicsMode_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_brl_graphics_TGraphicsMode
	mov	dword [ebx+8],0
	mov	dword [ebx+12],0
	mov	dword [ebx+16],0
	mov	dword [ebx+20],0
	mov	eax,0
	jmp	_53
_53:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_graphics_TGraphicsMode_Delete:
	push	ebp
	mov	ebp,esp
_56:
	mov	eax,0
	jmp	_155
_155:
	mov	esp,ebp
	pop	ebp
	ret
__brl_graphics_TGraphicsMode_ToString:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	_5
	push	dword [ebx+20]
	call	_bbStringFromInt
	add	esp,4
	push	eax
	push	_4
	push	dword [ebx+16]
	call	_bbStringFromInt
	add	esp,4
	push	eax
	push	_3
	push	dword [ebx+12]
	call	_bbStringFromInt
	add	esp,4
	push	eax
	push	_3
	push	dword [ebx+8]
	call	_bbStringFromInt
	add	esp,4
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	jmp	_59
_59:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_graphics_TGraphicsDriver_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_brl_graphics_TGraphicsDriver
	mov	eax,0
	jmp	_62
_62:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_graphics_TGraphicsDriver_Delete:
	push	ebp
	mov	ebp,esp
_65:
	mov	eax,0
	jmp	_156
_156:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_BumpGraphicsSeq:
	push	ebp
	mov	ebp,esp
	add	dword [_brl_graphics_GraphicsSeq],1
	cmp	dword [_brl_graphics_GraphicsSeq],0
	jne	_157
	mov	dword [_brl_graphics_GraphicsSeq],1
_157:
	mov	eax,0
	jmp	_67
_67:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_SetGraphicsDriver:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	edi,dword [ebp+12]
	call	_brl_graphics_BumpGraphicsSeq
	cmp	esi,dword [_136]
	je	_158
	mov	eax,dword [_136]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	je	_159
	mov	eax,dword [_138]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
_159:
	cmp	eax,0
	je	_161
	mov	eax,dword [_136]
	push	_bbNullObject
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,8
_161:
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [_137]
	dec	dword [eax+4]
	jnz	_166
	push	eax
	call	_bbGCFree
	add	esp,4
_166:
	mov	dword [_137],ebx
	mov	ebx,esi
	inc	dword [ebx+4]
	mov	eax,dword [_136]
	dec	dword [eax+4]
	jnz	_170
	push	eax
	call	_bbGCFree
	add	esp,4
_170:
	mov	dword [_136],ebx
_158:
	mov	dword [_135],edi
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [_138]
	dec	dword [eax+4]
	jnz	_174
	push	eax
	call	_bbGCFree
	add	esp,4
_174:
	mov	dword [_138],ebx
	mov	dword [_139],0
	mov	dword [_140],0
	mov	dword [_141],0
	mov	dword [_142],0
	mov	dword [_143],0
	mov	eax,0
	jmp	_71
_71:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GetGraphicsDriver:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_136]
	jmp	_73
_73:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_DefaultGraphicsFlags:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_135]
	jmp	_75
_75:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GraphicsModes:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	eax,dword [_137]
	cmp	dword [eax+16],0
	jne	_175
	mov	eax,dword [_136]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [_137]
	dec	dword [eax+4]
	jnz	_180
	push	eax
	call	_bbGCFree
	add	esp,4
_180:
	mov	dword [_137],ebx
_175:
	mov	eax,dword [_137]
	push	dword [eax+20]
	push	0
	push	dword [_137]
	push	_181
	call	_bbArraySlice
	add	esp,16
	jmp	_77
_77:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_CountGraphicsModes:
	push	ebp
	mov	ebp,esp
	call	_brl_graphics_GraphicsModes
	mov	eax,dword [eax+20]
	jmp	_79
_79:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GetGraphicsMode:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	mov	edi,dword [ebp+16]
	call	_brl_graphics_GraphicsModes
	mov	eax,dword [eax+esi*4+24]
	mov	edx,dword [eax+8]
	mov	dword [ebx],edx
	mov	edx,dword [eax+12]
	mov	dword [edi],edx
	mov	ecx,dword [eax+16]
	mov	edx,dword [ebp+20]
	mov	dword [edx],ecx
	mov	edx,dword [eax+20]
	mov	eax,dword [ebp+24]
	mov	dword [eax],edx
	mov	eax,0
	jmp	_86
_86:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GraphicsModeExists:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	ebx,dword [ebp+8]
	mov	edi,dword [ebp+12]
	call	_brl_graphics_GraphicsModes
	mov	ecx,eax
	mov	eax,ecx
	add	eax,24
	mov	edx,eax
	mov	eax,edx
	add	eax,dword [ecx+16]
	mov	dword [ebp-4],eax
	jmp	_6
_8:
	mov	esi,dword [edx]
	add	edx,4
	cmp	esi,_bbNullObject
	je	_6
	mov	eax,ebx
	cmp	eax,0
	je	_189
	cmp	ebx,dword [esi+8]
	setne	al
	movzx	eax,al
_189:
	cmp	eax,0
	je	_191
	jmp	_6
_191:
	mov	eax,edi
	cmp	eax,0
	je	_192
	cmp	edi,dword [esi+12]
	setne	al
	movzx	eax,al
_192:
	cmp	eax,0
	je	_194
	jmp	_6
_194:
	mov	eax,dword [ebp+16]
	cmp	eax,0
	je	_195
	mov	eax,dword [ebp+16]
	cmp	eax,dword [esi+16]
	setne	al
	movzx	eax,al
_195:
	cmp	eax,0
	je	_197
	jmp	_6
_197:
	mov	eax,dword [ebp+20]
	cmp	eax,0
	je	_198
	mov	eax,dword [ebp+20]
	cmp	eax,dword [esi+20]
	setne	al
	movzx	eax,al
_198:
	cmp	eax,0
	je	_200
	jmp	_6
_200:
	mov	eax,1
	jmp	_92
_6:
	cmp	edx,dword [ebp-4]
	jne	_8
_7:
	mov	eax,0
	jmp	_92
_92:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_CreateGraphics:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+12]
	mov	esi,dword [ebp+24]
	or	esi,dword [_135]
	mov	dword [ebp-4],_bbNullObject
	call	_bbExEnter
	mov	ebx,eax
	push	ebx
	call	__bbExEnter
	add	esp,4
	mov	ebx,eax
	cmp	ebx,0
	jne	_203
	mov	eax,dword [_136]
	push	esi
	push	dword [ebp+20]
	push	dword [ebp+16]
	push	edi
	push	dword [ebp+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,24
	mov	dword [ebp-4],eax
	call	_bbExLeave
	jmp	_204
_203:
	push	_bbObjectClass
	push	ebx
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	jne	_206
	push	ebx
	call	_bbExThrow
	add	esp,4
_206:
	jmp	_204
_204:
	mov	eax,dword [ebp-4]
	jmp	_99
_99:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_AttachGraphics:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+8]
	mov	esi,dword [ebp+12]
	or	esi,dword [_135]
	mov	dword [ebp-4],_bbNullObject
	call	_bbExEnter
	mov	ebx,eax
	push	ebx
	call	__bbExEnter
	add	esp,4
	mov	ebx,eax
	cmp	ebx,0
	jne	_210
	mov	eax,dword [_136]
	push	esi
	push	edi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,12
	mov	dword [ebp-4],eax
	call	_bbExLeave
	jmp	_211
_210:
	push	_bbObjectClass
	push	ebx
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	jne	_213
	push	ebx
	call	_bbExThrow
	add	esp,4
_213:
	jmp	_211
_211:
	mov	eax,dword [ebp-4]
	jmp	_103
_103:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_CloseGraphics:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [ebp+8]
	cmp	esi,dword [_144]
	jne	_215
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [_144]
	dec	dword [eax+4]
	jnz	_219
	push	eax
	call	_bbGCFree
	add	esp,4
_219:
	mov	dword [_144],ebx
_215:
	cmp	esi,dword [_138]
	jne	_220
	push	_bbNullObject
	call	_brl_graphics_SetGraphics
	add	esp,4
_220:
	push	esi
	mov	eax,dword [esi]
	call	dword [eax+60]
	add	esp,4
	mov	eax,0
	jmp	_106
_106:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_SetGraphics:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	ebx,dword [ebp+8]
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_222
	mov	eax,dword [_136]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	je	_223
	mov	eax,dword [_138]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
_223:
	cmp	eax,0
	je	_225
	mov	eax,dword [_136]
	push	_bbNullObject
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,8
_225:
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [_138]
	dec	dword [eax+4]
	jnz	_230
	push	eax
	call	_bbGCFree
	add	esp,4
_230:
	mov	dword [_138],ebx
	mov	dword [_139],0
	mov	dword [_140],0
	mov	dword [_141],0
	mov	dword [_142],0
	mov	dword [_143],0
	mov	eax,0
	jmp	_109
_222:
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	mov	edi,eax
	cmp	edi,dword [_136]
	je	_233
	mov	eax,dword [_136]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	je	_234
	mov	eax,dword [_138]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
_234:
	cmp	eax,0
	je	_236
	mov	eax,dword [_136]
	push	_bbNullObject
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,8
_236:
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [_137]
	dec	dword [eax+4]
	jnz	_241
	push	eax
	call	_bbGCFree
	add	esp,4
_241:
	mov	dword [_137],esi
	mov	eax,edi
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [_136]
	dec	dword [eax+4]
	jnz	_245
	push	eax
	call	_bbGCFree
	add	esp,4
_245:
	mov	dword [_136],esi
_233:
	mov	eax,ebx
	lea	edx,dword [_143]
	push	edx
	lea	edx,dword [_142]
	push	edx
	lea	edx,dword [_141]
	push	edx
	lea	edx,dword [_140]
	push	edx
	lea	edx,dword [_139]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,24
	mov	eax,edi
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,8
	inc	dword [ebx+4]
	mov	eax,dword [_138]
	dec	dword [eax+4]
	jnz	_251
	push	eax
	call	_bbGCFree
	add	esp,4
_251:
	mov	dword [_138],ebx
	mov	eax,0
	jmp	_109
_109:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GraphicsWidth:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_139]
	jmp	_111
_111:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GraphicsHeight:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_140]
	jmp	_113
_113:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GraphicsDepth:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_141]
	jmp	_115
_115:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GraphicsHertz:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_142]
	jmp	_117
_117:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_GraphicsFlags:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_143]
	jmp	_119
_119:
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_Flip:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	_bbNullObject
	push	dword [_brl_graphics_FlipHook]
	call	_brl_hook_RunHooks
	add	esp,8
	cmp	ebx,-1
	je	_252
	mov	eax,dword [_136]
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
	mov	eax,0
	jmp	_122
_252:
	mov	eax,dword [_144]
	cmp	dword [_138],eax
	je	_254
	mov	eax,dword [_136]
	push	1
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
	mov	eax,0
	jmp	_122
_254:
	cmp	dword [_145],0
	je	_256
	mov	eax,dword [_148]
	add	dword [_151],eax
	mov	eax,dword [_149]
	add	dword [_150],eax
	mov	eax,dword [_147]
	cmp	dword [_150],eax
	jl	_257
	mov	eax,dword [_147]
	sub	dword [_150],eax
	add	dword [_151],1
_257:
	mov	ebx,dword [_151]
	call	_bbMilliSecs
	sub	ebx,eax
	cmp	ebx,0
	jle	_259
	push	ebx
	call	_bbDelay
	add	esp,4
	jmp	_260
_259:
	sub	dword [_151],ebx
_260:
	mov	eax,dword [_136]
	push	0
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
	jmp	_262
_256:
	cmp	dword [_146],0
	je	_263
	mov	eax,dword [_136]
	push	1
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
	jmp	_265
_263:
	mov	eax,dword [_136]
	push	0
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
_265:
_262:
	mov	eax,0
	jmp	_122
_122:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_Graphics:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+8]
	mov	esi,dword [ebp+16]
	mov	ebx,dword [ebp+24]
	call	_brl_graphics_EndGraphics
	or	ebx,dword [_135]
	push	ebx
	push	dword [ebp+20]
	push	esi
	push	dword [ebp+12]
	push	edi
	call	_brl_graphics_CreateGraphics
	add	esp,20
	mov	ebx,eax
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_268
	mov	eax,_bbNullObject
	jmp	_129
_268:
	call	_brl_graphics_BumpGraphicsSeq
	push	ebx
	call	_brl_graphics_SetGraphics
	add	esp,4
	cmp	esi,0
	je	_269
	mov	dword [_145],0
	mov	eax,dword [ebp+20]
	cmp	eax,0
	setne	al
	movzx	eax,al
	mov	dword [_146],eax
	mov	eax,dword [ebp+12]
	cdq
	and	edx,1
	add	eax,edx
	sar	eax,1
	push	eax
	mov	eax,edi
	cdq
	and	edx,1
	add	eax,edx
	sar	eax,1
	push	eax
	call	_brl_system_MoveMouse
	add	esp,8
	jmp	_270
_269:
	mov	dword [_146],0
	mov	eax,dword [ebp+20]
	cmp	eax,0
	setne	al
	movzx	eax,al
	mov	dword [_145],eax
_270:
	cmp	dword [_145],0
	je	_271
	mov	eax,dword [ebp+20]
	mov	dword [_147],eax
	cmp	dword [_147],0
	je	_272
	mov	eax,1000
	cdq
	idiv	dword [_147]
	mov	dword [_148],eax
	jmp	_273
_272:
	mov	dword [_148],0
_273:
	mov	edx,1000
	mov	eax,dword [_148]
	imul	eax,dword [_147]
	sub	edx,eax
	mov	dword [_149],edx
	mov	dword [_150],0
	call	_bbMilliSecs
	mov	dword [_151],eax
_271:
	push	_bbNullObject
	call	_brl_polledinput_EnablePolledInput
	add	esp,4
	mov	esi,ebx
	inc	dword [esi+4]
	mov	eax,dword [_144]
	dec	dword [eax+4]
	jnz	_277
	push	eax
	call	_bbGCFree
	add	esp,4
_277:
	mov	dword [_144],esi
	cmp	dword [_278],0
	jne	_279
	mov	dword [_278],1
	push	_brl_graphics_EndGraphics
	call	_bbOnEnd
	add	esp,4
_279:
	mov	eax,ebx
	jmp	_129
_129:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_graphics_EndGraphics:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_144]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_280
	mov	eax,0
	jmp	_131
_280:
	add	dword [_brl_graphics_GraphicsSeq],1
	cmp	dword [_brl_graphics_GraphicsSeq],0
	jne	_281
	mov	dword [_brl_graphics_GraphicsSeq],1
_281:
	call	_brl_polledinput_DisablePolledInput
	push	dword [_144]
	call	_brl_graphics_CloseGraphics
	add	esp,4
	mov	eax,0
	jmp	_131
_131:
	mov	esp,ebp
	pop	ebp
	ret
	section	"data" data writeable align 8
	align	4
_152:
	dd	0
_10:
	db	"TGraphics",0
_11:
	db	"New",0
_12:
	db	"()i",0
_13:
	db	"Delete",0
_14:
	db	"_pad",0
_15:
	db	"Driver",0
_16:
	db	"():TGraphicsDriver",0
_17:
	db	"GetSettings",0
_18:
	db	"(*i,*i,*i,*i,*i)i",0
_19:
	db	"Close",0
	align	4
_9:
	dd	2
	dd	_10
	dd	6
	dd	_11
	dd	_12
	dd	16
	dd	6
	dd	_13
	dd	_12
	dd	20
	dd	6
	dd	_14
	dd	_12
	dd	48
	dd	6
	dd	_15
	dd	_16
	dd	52
	dd	6
	dd	_17
	dd	_18
	dd	56
	dd	6
	dd	_19
	dd	_12
	dd	60
	dd	0
	align	4
_brl_graphics_TGraphics:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_9
	dd	8
	dd	__brl_graphics_TGraphics_New
	dd	__brl_graphics_TGraphics_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__brl_graphics_TGraphics__pad
	dd	_brl_blitz_NullMethodError
	dd	_brl_blitz_NullMethodError
	dd	_brl_blitz_NullMethodError
_21:
	db	"TGraphicsMode",0
_22:
	db	"width",0
_23:
	db	"i",0
_24:
	db	"height",0
_25:
	db	"depth",0
_26:
	db	"hertz",0
_27:
	db	"ToString",0
_28:
	db	"()$",0
	align	4
_20:
	dd	2
	dd	_21
	dd	3
	dd	_22
	dd	_23
	dd	8
	dd	3
	dd	_24
	dd	_23
	dd	12
	dd	3
	dd	_25
	dd	_23
	dd	16
	dd	3
	dd	_26
	dd	_23
	dd	20
	dd	6
	dd	_11
	dd	_12
	dd	16
	dd	6
	dd	_13
	dd	_12
	dd	20
	dd	6
	dd	_27
	dd	_28
	dd	24
	dd	0
	align	4
_brl_graphics_TGraphicsMode:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_20
	dd	24
	dd	__brl_graphics_TGraphicsMode_New
	dd	__brl_graphics_TGraphicsMode_Delete
	dd	__brl_graphics_TGraphicsMode_ToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
_30:
	db	"TGraphicsDriver",0
_31:
	db	"GraphicsModes",0
_32:
	db	"()[]:TGraphicsMode",0
_33:
	db	"AttachGraphics",0
_34:
	db	"(i,i):TGraphics",0
_35:
	db	"CreateGraphics",0
_36:
	db	"(i,i,i,i,i):TGraphics",0
_37:
	db	"SetGraphics",0
_38:
	db	"(:TGraphics)i",0
_39:
	db	"Flip",0
_40:
	db	"(i)i",0
	align	4
_29:
	dd	2
	dd	_30
	dd	6
	dd	_11
	dd	_12
	dd	16
	dd	6
	dd	_13
	dd	_12
	dd	20
	dd	6
	dd	_31
	dd	_32
	dd	48
	dd	6
	dd	_33
	dd	_34
	dd	52
	dd	6
	dd	_35
	dd	_36
	dd	56
	dd	6
	dd	_37
	dd	_38
	dd	60
	dd	6
	dd	_39
	dd	_40
	dd	64
	dd	0
	align	4
_brl_graphics_TGraphicsDriver:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_29
	dd	8
	dd	__brl_graphics_TGraphicsDriver_New
	dd	__brl_graphics_TGraphicsDriver_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_brl_blitz_NullMethodError
	dd	_brl_blitz_NullMethodError
	dd	_brl_blitz_NullMethodError
	dd	_brl_blitz_NullMethodError
	dd	_brl_blitz_NullMethodError
	align	4
_133:
	dd	0
	align	4
_brl_graphics_FlipHook:
	dd	0
	align	4
_135:
	dd	0
	align	4
_136:
	dd	_bbNullObject
	align	4
_137:
	dd	_bbEmptyArray
	align	4
_138:
	dd	_bbNullObject
	align	4
_139:
	dd	0
	align	4
_140:
	dd	0
	align	4
_141:
	dd	0
	align	4
_142:
	dd	0
	align	4
_143:
	dd	0
	align	4
_144:
	dd	_bbNullObject
	align	4
_145:
	dd	0
	align	4
_146:
	dd	0
	align	4
_147:
	dd	0
	align	4
_148:
	dd	0
	align	4
_149:
	dd	0
	align	4
_150:
	dd	0
	align	4
_151:
	dd	0
	align	4
_brl_graphics_GraphicsSeq:
	dd	1
	align	4
_5:
	dd	_bbStringClass
	dd	2147483647
	dd	2
	dw	72,122
	align	4
_4:
	dd	_bbStringClass
	dd	2147483647
	dd	1
	dw	32
	align	4
_3:
	dd	_bbStringClass
	dd	2147483647
	dd	1
	dw	44
_181:
	db	":TGraphicsMode",0
	align	4
_278:
	dd	0
