	format	MS COFF
	extrn	___bb_CrazyGolf_gametypes
	extrn	___bb_CrazyGolf_global
	extrn	___bb_CrazyGolf_particle
	extrn	___bb_bitmapfont_bitmapfont
	extrn	___bb_blitz_blitz
	extrn	___bb_d3d7max2d_d3d7max2d
	extrn	___bb_glmax2d_glmax2d
	extrn	___bb_keysyms_keysyms
	extrn	___bb_max2d_max2d
	extrn	__bb_GFX_font
	extrn	__bb_GFX_title
	extrn	_bbAppArgs
	extrn	_bbEnd
	extrn	_bbMilliSecs
	extrn	_bbNullObject
	extrn	_bbStringClass
	extrn	_bbStringCompare
	extrn	_bb_GFX
	extrn	_bb_Lookup
	extrn	_bb_Particles
	extrn	_bb_Scroller
	extrn	_bb_TFadeScreen
	extrn	_brl_d3d7max2d_D3D7Max2DDriver
	extrn	_brl_glmax2d_GLMax2DDriver
	extrn	_brl_graphics_EndGraphics
	extrn	_brl_graphics_Flip
	extrn	_brl_graphics_Graphics
	extrn	_brl_graphics_SetGraphicsDriver
	extrn	_brl_max2d_Cls
	extrn	_brl_max2d_DrawImage
	extrn	_brl_max2d_SetAlpha
	extrn	_brl_max2d_SetBlend
	extrn	_brl_max2d_SetColor
	extrn	_brl_polledinput_KeyHit
	extrn	_brl_random_SeedRnd
	extrn	_brl_system_HideMouse
	public	__bb_main
	public	_bb_Menu
	public	_bb_Switch
	public	_bb_quit
	section	"code" code
__bb_main:
	push	ebp
	mov	ebp,esp
	cmp	dword [_39],0
	je	_40
	mov	eax,0
	mov	esp,ebp
	pop	ebp
	ret
_40:
	mov	dword [_39],1
	call	___bb_blitz_blitz
	call	___bb_max2d_max2d
	call	___bb_glmax2d_glmax2d
	call	___bb_d3d7max2d_d3d7max2d
	call	___bb_bitmapfont_bitmapfont
	call	___bb_keysyms_keysyms
	call	___bb_CrazyGolf_global
	call	___bb_CrazyGolf_gametypes
	call	___bb_CrazyGolf_particle
	call	_bbMilliSecs
	push	eax
	call	_brl_random_SeedRnd
	add	esp,4
	push	_19
	call	_bb_Switch
	add	esp,4
	cmp	eax,0
	je	_37
	push	2
	call	_brl_d3d7max2d_D3D7Max2DDriver
	push	eax
	call	_brl_graphics_SetGraphicsDriver
	add	esp,8
	jmp	_38
_37:
	push	2
	call	_brl_glmax2d_GLMax2DDriver
	push	eax
	call	_brl_graphics_SetGraphicsDriver
	add	esp,8
_38:
	push	0
	push	70
	push	32
	push	600
	push	800
	call	_brl_graphics_Graphics
	add	esp,20
	call	_brl_system_HideMouse
	push	3
	call	_brl_max2d_SetBlend
	add	esp,4
	push	1065353216
	call	_brl_max2d_SetAlpha
	add	esp,4
	call	dword [_bb_GFX+56]
	call	dword [_bb_Lookup+48]
	call	dword [_bb_Scroller+48]
	call	dword [_bb_Particles+48]
	call	_bb_Menu
	jmp	_20
_22:
	call	dword [_bb_TFadeScreen+60]
	call	_bb_Menu
_20:
	cmp	dword [_bb_quit],0
	je	_22
_21:
	call	_brl_graphics_EndGraphics
	call	_bbEnd
	mov	eax,0
_30:
	mov	esp,ebp
	pop	ebp
	ret
_bb_Switch:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+8]
	mov	esi,dword [_bbAppArgs]
	mov	eax,esi
	add	eax,24
	mov	ebx,eax
	mov	eax,ebx
	add	eax,dword [esi+16]
	mov	dword [ebp-4],eax
	jmp	_23
_25:
	mov	eax,dword [ebx]
	add	ebx,4
	cmp	eax,_bbNullObject
	je	_23
	push	edi
	push	eax
	call	_bbStringCompare
	add	esp,8
	cmp	eax,0
	jne	_46
	mov	eax,1
	jmp	_33
_46:
_23:
	cmp	ebx,dword [ebp-4]
	jne	_25
_24:
	mov	eax,0
_33:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_bb_Menu:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	call	dword [_bb_TFadeScreen+56]
	mov	ebx,eax
	mov	esi,0
	call	dword [_bb_Particles+52]
	jmp	_26
_28:
	call	_brl_max2d_Cls
	push	255
	push	255
	push	255
	call	_brl_max2d_SetColor
	add	esp,12
	push	0
	push	0
	push	0
	push	dword [__bb_GFX_title]
	call	_brl_max2d_DrawImage
	add	esp,16
	call	dword [_bb_Particles+64]
	call	dword [_bb_Scroller+52]
	push	27
	call	_brl_polledinput_KeyHit
	add	esp,4
	cmp	eax,0
	je	_49
	mov	esi,1
	mov	dword [_bb_quit],1
_49:
	push	32
	call	_brl_polledinput_KeyHit
	add	esp,4
	cmp	eax,0
	je	_50
	mov	esi,1
_50:
	mov	eax,dword [__bb_GFX_font]
	push	255
	push	255
	push	255
	push	4
	push	_29
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,24
	cmp	ebx,_bbNullObject
	je	_52
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+64]
	add	esp,4
	cmp	eax,0
	je	_54
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+68]
	add	esp,4
	jmp	_56
_54:
	mov	ebx,_bbNullObject
_56:
_52:
	push	-1
	call	_brl_graphics_Flip
	add	esp,4
_26:
	cmp	esi,0
	je	_28
_27:
	call	dword [_bb_Particles+52]
	call	dword [_bb_TFadeScreen+60]
	mov	eax,0
_35:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
	section	"data" data writeable align 8
	align	4
_39:
	dd	0
	align	4
_19:
	dd	_bbStringClass
	dd	2147483647
	dd	9
	dw	45,45,100,105,114,101,99,116,120
	align	4
_bb_quit:
	dd	0
	align	4
_29:
	dd	_bbStringClass
	dd	2147483647
	dd	27
	dw	67,79,80,89,82,73,71,72,84,32,40,67,41,32,78,79
	dw	68,68,89,66,79,88,32,50,48,48,54
