	format	MS COFF
	extrn	___bb_blitz_blitz
	extrn	___bb_hardwire_gametypes
	extrn	___bb_hardwire_particle
	extrn	___bb_hardwire_sounds
	extrn	___bb_hardwire_types
	extrn	__bb_GameConfig_hiscore
	extrn	__bb_GameConfig_kdrop
	extrn	__bb_GameConfig_kleft
	extrn	__bb_GameConfig_kpause
	extrn	__bb_GameConfig_kright
	extrn	__bb_GameConfig_krotleft
	extrn	__bb_GameConfig_krotright
	extrn	__bb_GameGFX_gameover
	extrn	__bb_GameGFX_large
	extrn	_bbArrayNew1D
	extrn	_bbFloatMax
	extrn	_bbFloatMin
	extrn	_bbGCFree
	extrn	_bbIntMax
	extrn	_bbNullObject
	extrn	_bbObjectClass
	extrn	_bbObjectCompare
	extrn	_bbObjectCtor
	extrn	_bbObjectDowncast
	extrn	_bbObjectDtor
	extrn	_bbObjectFree
	extrn	_bbObjectNew
	extrn	_bbObjectRegisterType
	extrn	_bbObjectReserved
	extrn	_bbObjectSendMessage
	extrn	_bbObjectToString
	extrn	_bbStringClass
	extrn	_bbStringFromInt
	extrn	_bb_ExplosionParticles
	extrn	_bb_Number
	extrn	_bb_Particles
	extrn	_bb_Sound
	extrn	_bb_TFadeScreen
	extrn	_bb_TGameBackdrop
	extrn	_bb_TGameMap
	extrn	_bb_TPiece
	extrn	_bb_TextParticles
	extrn	_brl_graphics_Flip
	extrn	_brl_graphics_GraphicsHeight
	extrn	_brl_graphics_GraphicsWidth
	extrn	_brl_linkedlist_CreateList
	extrn	_brl_max2d_Cls
	extrn	_brl_max2d_CreateImage
	extrn	_brl_max2d_DrawImage
	extrn	_brl_max2d_GrabImage
	extrn	_brl_max2d_MidHandleImage
	extrn	_brl_max2d_SetAlpha
	extrn	_brl_max2d_SetColor
	extrn	_brl_max2d_SetRotation
	extrn	_brl_max2d_SetScale
	extrn	_brl_polledinput_FlushKeys
	extrn	_brl_polledinput_KeyDown
	extrn	_brl_polledinput_KeyHit
	public	___bb_hardwire_game
	public	__bb_TBufferedKey_Clear
	public	__bb_TBufferedKey_Create
	public	__bb_TBufferedKey_Delete
	public	__bb_TBufferedKey_Flush
	public	__bb_TBufferedKey_ForceRelease
	public	__bb_TBufferedKey_Idle
	public	__bb_TBufferedKey_New
	public	__bb_TBufferedKey_Poll
	public	__bb_TBufferedKey_list
	public	__bb_TGame_CreateNext
	public	__bb_TGame_Delete
	public	__bb_TGame_LevelUp
	public	__bb_TGame_New
	public	__bb_TGame_Pause
	public	__bb_TGame_Play
	public	__bb_TGame_SetInitLevel
	public	__bb_TGame_SetTimer
	public	_bb_TBufferedKey
	public	_bb_TGame
	section	"code" code
___bb_hardwire_game:
	push	ebp
	mov	ebp,esp
	cmp	dword [_133],0
	je	_134
	mov	eax,0
	mov	esp,ebp
	pop	ebp
	ret
_134:
	mov	dword [_133],1
	call	___bb_blitz_blitz
	call	___bb_hardwire_types
	call	___bb_hardwire_particle
	call	___bb_hardwire_sounds
	call	___bb_hardwire_gametypes
	push	_bb_TBufferedKey
	call	_bbObjectRegisterType
	add	esp,4
	push	_bb_TGame
	call	_bbObjectRegisterType
	add	esp,4
	mov	eax,0
	jmp	_83
_83:
	mov	esp,ebp
	pop	ebp
	ret
__bb_TBufferedKey_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_bb_TBufferedKey
	mov	dword [ebx+8],0
	mov	dword [ebx+12],0
	mov	dword [ebx+16],0
	mov	eax,0
	jmp	_86
_86:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TBufferedKey_Delete:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
_89:
	mov	dword [eax],_bbObjectClass
	push	eax
	call	_bbObjectDtor
	add	esp,4
	mov	eax,0
	jmp	_135
_135:
	mov	esp,ebp
	pop	ebp
	ret
__bb_TBufferedKey_Clear:
	push	ebp
	mov	ebp,esp
	push	ebx
	call	_brl_linkedlist_CreateList
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [__bb_TBufferedKey_list]
	dec	dword [eax+4]
	jnz	_139
	push	eax
	call	_bbGCFree
	add	esp,4
_139:
	mov	dword [__bb_TBufferedKey_list],ebx
	mov	eax,0
	jmp	_91
_91:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TBufferedKey_Create:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	edi,dword [ebp+12]
	push	_bb_TBufferedKey
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
	mov	dword [ebx+8],esi
	mov	dword [ebx+12],edi
	mov	dword [ebx+16],0
	mov	eax,dword [__bb_TBufferedKey_list]
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,8
	mov	eax,ebx
	jmp	_95
_95:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TBufferedKey_Flush:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [__bb_TBufferedKey_list]
	push	esi
	mov	eax,dword [esi]
	call	dword [eax+140]
	add	esp,4
	mov	ebx,eax
	jmp	_18
_20:
	push	_bb_TBufferedKey
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+52]
	add	esp,4
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	je	_18
	mov	dword [eax+16],0
_18:
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_20
_19:
	mov	eax,0
	jmp	_97
_97:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TBufferedKey_Idle:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [__bb_TBufferedKey_list]
	push	esi
	mov	eax,dword [esi]
	call	dword [eax+140]
	add	esp,4
	mov	ebx,eax
	jmp	_21
_23:
	push	_bb_TBufferedKey
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+52]
	add	esp,4
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	je	_21
	cmp	dword [eax+16],0
	je	_154
	sub	dword [eax+16],1
_154:
_21:
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_23
_22:
	mov	eax,0
	jmp	_99
_99:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TBufferedKey_ForceRelease:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	dword [eax+16],999999
	mov	eax,0
	jmp	_102
_102:
	mov	esp,ebp
	pop	ebp
	ret
__bb_TBufferedKey_Poll:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	dword [ebx+8]
	call	_brl_polledinput_KeyDown
	add	esp,4
	cmp	eax,0
	je	_155
	cmp	dword [ebx+16],0
	je	_156
	sub	dword [ebx+16],1
	mov	eax,0
	jmp	_105
_156:
	mov	eax,dword [ebx+12]
	mov	dword [ebx+16],eax
	mov	eax,1
	jmp	_105
_155:
	mov	dword [ebx+16],0
	mov	eax,0
	jmp	_105
_105:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TGame_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_bb_TGame
	mov	dword [ebx+8],0
	mov	dword [ebx+12],0
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+16],eax
	mov	dword [ebx+20],0
	fldz
	fstp	qword [ebx+24]
	fldz
	fstp	qword [ebx+32]
	mov	dword [ebx+40],0
	mov	dword [ebx+44],0
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+48],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+52],eax
	mov	dword [ebx+56],0
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+60],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+64],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+68],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+72],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+76],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+80],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+84],eax
	mov	dword [ebx+12],0
	push	_bb_TGameMap
	call	_bbObjectNew
	add	esp,4
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_172
	push	eax
	call	_bbGCFree
	add	esp,4
_172:
	mov	dword [ebx+16],esi
	mov	dword [ebx+8],1
	call	dword [_bb_Particles+52]
	call	dword [_bb_TextParticles+52]
	call	dword [_bb_ExplosionParticles+52]
	fldz
	fstp	qword [ebx+24]
	fld	qword [_357]
	fstp	qword [ebx+32]
	mov	dword [ebx+40],0
	mov	dword [ebx+44],0
	push	0
	call	dword [_bb_TPiece+48]
	add	esp,4
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+52]
	dec	dword [eax+4]
	jnz	_176
	push	eax
	call	_bbGCFree
	add	esp,4
_176:
	mov	dword [ebx+52],esi
	mov	dword [ebx+56],0
	push	0
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+60]
	add	esp,8
	call	dword [_bb_TFadeScreen+56]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+60]
	dec	dword [eax+4]
	jnz	_181
	push	eax
	call	_bbGCFree
	add	esp,4
_181:
	mov	dword [ebx+60],esi
	push	_bb_TGameBackdrop
	call	_bbObjectNew
	add	esp,4
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+64]
	dec	dword [eax+4]
	jnz	_185
	push	eax
	call	_bbGCFree
	add	esp,4
_185:
	mov	dword [ebx+64],esi
	call	dword [_bb_TBufferedKey+48]
	push	30
	push	dword [__bb_GameConfig_kleft]
	call	dword [_bb_TBufferedKey+52]
	add	esp,8
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+68]
	dec	dword [eax+4]
	jnz	_189
	push	eax
	call	_bbGCFree
	add	esp,4
_189:
	mov	dword [ebx+68],esi
	push	30
	push	dword [__bb_GameConfig_kright]
	call	dword [_bb_TBufferedKey+52]
	add	esp,8
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+72]
	dec	dword [eax+4]
	jnz	_193
	push	eax
	call	_bbGCFree
	add	esp,4
_193:
	mov	dword [ebx+72],esi
	push	30
	push	dword [__bb_GameConfig_krotleft]
	call	dword [_bb_TBufferedKey+52]
	add	esp,8
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+76]
	dec	dword [eax+4]
	jnz	_197
	push	eax
	call	_bbGCFree
	add	esp,4
_197:
	mov	dword [ebx+76],esi
	push	30
	push	dword [__bb_GameConfig_krotright]
	call	dword [_bb_TBufferedKey+52]
	add	esp,8
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+80]
	dec	dword [eax+4]
	jnz	_201
	push	eax
	call	_bbGCFree
	add	esp,4
_201:
	mov	dword [ebx+80],esi
	push	1
	push	dword [__bb_GameConfig_kdrop]
	call	dword [_bb_TBufferedKey+52]
	add	esp,8
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+84]
	dec	dword [eax+4]
	jnz	_205
	push	eax
	call	_bbGCFree
	add	esp,4
_205:
	mov	dword [ebx+84],esi
	mov	eax,0
	jmp	_108
_108:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TGame_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_111:
	mov	eax,dword [ebx+84]
	dec	dword [eax+4]
	jnz	_208
	push	eax
	call	_bbGCFree
	add	esp,4
_208:
	mov	eax,dword [ebx+80]
	dec	dword [eax+4]
	jnz	_210
	push	eax
	call	_bbGCFree
	add	esp,4
_210:
	mov	eax,dword [ebx+76]
	dec	dword [eax+4]
	jnz	_212
	push	eax
	call	_bbGCFree
	add	esp,4
_212:
	mov	eax,dword [ebx+72]
	dec	dword [eax+4]
	jnz	_214
	push	eax
	call	_bbGCFree
	add	esp,4
_214:
	mov	eax,dword [ebx+68]
	dec	dword [eax+4]
	jnz	_216
	push	eax
	call	_bbGCFree
	add	esp,4
_216:
	mov	eax,dword [ebx+64]
	dec	dword [eax+4]
	jnz	_218
	push	eax
	call	_bbGCFree
	add	esp,4
_218:
	mov	eax,dword [ebx+60]
	dec	dword [eax+4]
	jnz	_220
	push	eax
	call	_bbGCFree
	add	esp,4
_220:
	mov	eax,dword [ebx+52]
	dec	dword [eax+4]
	jnz	_222
	push	eax
	call	_bbGCFree
	add	esp,4
_222:
	mov	eax,dword [ebx+48]
	dec	dword [eax+4]
	jnz	_224
	push	eax
	call	_bbGCFree
	add	esp,4
_224:
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_226
	push	eax
	call	_bbGCFree
	add	esp,4
_226:
	mov	dword [ebx],_bbObjectClass
	push	ebx
	call	_bbObjectDtor
	add	esp,4
	mov	eax,0
	jmp	_206
_206:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TGame_SetInitLevel:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	dword [eax+8],edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	mov	eax,0
	jmp	_115
_115:
	mov	esp,ebp
	pop	ebp
	ret
__bb_TGame_SetTimer:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	cmp	dword [ebx+56],0
	je	_228
	mov	dword [ebx+20],5
	jmp	_229
_228:
	mov	eax,20
	sub	eax,dword [ebx+8]
	imul	eax,5
	push	eax
	push	5
	call	_bbIntMax
	add	esp,8
	mov	dword [ebx+20],eax
_229:
	mov	eax,0
	jmp	_118
_118:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TGame_LevelUp:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	add	dword [eax+8],1
	mov	dword [eax+40],0
	mov	eax,0
	jmp	_121
_121:
	mov	esp,ebp
	pop	ebp
	ret
__bb_TGame_CreateNext:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	mov	eax,dword [esi+52]
	inc	dword [eax+4]
	mov	edi,eax
	mov	eax,dword [esi+48]
	dec	dword [eax+4]
	jnz	_233
	push	eax
	call	_bbGCFree
	add	esp,4
_233:
	mov	dword [esi+48],edi
	mov	eax,dword [esi+48]
	mov	dword [eax+12],-3
	mov	eax,dword [esi+48]
	mov	dword [eax+8],5
	push	ebx
	call	dword [_bb_TPiece+48]
	add	esp,4
	mov	ebx,eax
	inc	dword [ebx+4]
	mov	eax,dword [esi+52]
	dec	dword [eax+4]
	jnz	_237
	push	eax
	call	_bbGCFree
	add	esp,4
_237:
	mov	dword [esi+52],ebx
	mov	eax,dword [esi+52]
	mov	dword [eax+8],13
	mov	eax,dword [esi+52]
	mov	dword [eax+12],1
	mov	dword [esi+56],0
	mov	eax,0
	jmp	_125
_125:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TGame_Pause:
	push	ebp
	mov	ebp,esp
	sub	esp,20
	push	ebx
	push	esi
	push	edi
	push	11
	push	1
	call	_brl_graphics_GraphicsHeight
	push	eax
	call	_brl_graphics_GraphicsWidth
	push	eax
	call	_brl_max2d_CreateImage
	add	esp,16
	mov	dword [ebp-16],eax
	push	0
	push	0
	push	0
	push	dword [ebp-16]
	call	_brl_max2d_GrabImage
	add	esp,16
	push	dword [ebp-16]
	call	_brl_max2d_MidHandleImage
	add	esp,4
	push	255
	push	255
	push	255
	call	_brl_max2d_SetColor
	add	esp,12
	call	_brl_polledinput_FlushKeys
	push	8
	push	_37
	call	_bbArrayNew1D
	add	esp,8
	mov	dword [eax+24],0
	mov	dword [eax+28],0
	mov	dword [eax+32],0
	mov	dword [eax+36],0
	mov	dword [eax+40],0
	mov	dword [eax+44],0
	mov	dword [eax+48],0
	mov	dword [eax+52],0
	mov	esi,eax
	push	8
	push	_37
	call	_bbArrayNew1D
	add	esp,8
	mov	dword [eax+24],7
	mov	dword [eax+28],6
	mov	dword [eax+32],5
	mov	dword [eax+36],4
	mov	dword [eax+40],3
	mov	dword [eax+44],2
	mov	dword [eax+48],1
	mov	dword [eax+52],0
	mov	edi,eax
	jmp	_24
_26:
	call	_brl_max2d_Cls
	fld	qword [_371]
	fstp	qword [ebp-8]
	mov	ebx,0
	mov	eax,dword [esi+20]
	mov	dword [ebp-12],eax
	jmp	_245
_29:
	fld	qword [ebp-8]
	sub	esp,4
	fstp	dword [esp]
	call	_brl_max2d_SetAlpha
	add	esp,4
	mov	eax,dword [esi+ebx*4+24]
	mov	dword [ebp+-20],eax
	fild	dword [ebp+-20]
	sub	esp,4
	fstp	dword [esp]
	call	_brl_max2d_SetRotation
	add	esp,4
	fld	qword [ebp-8]
	fld	qword [_372]
	fmulp	st1,st0
	sub	esp,4
	fstp	dword [esp]
	fld	qword [ebp-8]
	fld	qword [_373]
	fmulp	st1,st0
	sub	esp,4
	fstp	dword [esp]
	call	_brl_max2d_SetScale
	add	esp,8
	push	0
	call	_brl_graphics_GraphicsHeight
	cdq
	and	edx,1
	add	eax,edx
	sar	eax,1
	mov	dword [ebp+-20],eax
	fild	dword [ebp+-20]
	sub	esp,4
	fstp	dword [esp]
	call	_brl_graphics_GraphicsWidth
	cdq
	and	edx,1
	add	eax,edx
	sar	eax,1
	mov	dword [ebp+-20],eax
	fild	dword [ebp+-20]
	sub	esp,4
	fstp	dword [esp]
	push	dword [ebp-16]
	call	_brl_max2d_DrawImage
	add	esp,16
	cmp	dword [edi+ebx*4+24],0
	jle	_247
	sub	dword [edi+ebx*4+24],1
	jmp	_248
_247:
	mov	ecx,2
	mov	eax,ebx
	cdq
	idiv	ecx
	mov	eax,edx
	cmp	eax,0
	je	_249
	add	dword [esi+ebx*4+24],1
	jmp	_250
_249:
	sub	dword [esi+ebx*4+24],1
_250:
_248:
	fld	qword [_374]
	fld	qword [ebp-8]
	faddp	st1,st0
	fstp	qword [ebp-8]
_27:
	add	ebx,1
_245:
	cmp	ebx,dword [ebp-12]
	jl	_29
_28:
	push	0
	call	_brl_max2d_SetRotation
	add	esp,4
	push	1065353216
	push	1065353216
	call	_brl_max2d_SetScale
	add	esp,8
	mov	ebx,dword [__bb_GameGFX_large]
	push	255
	push	255
	push	255
	call	_brl_graphics_GraphicsHeight
	cdq
	and	edx,1
	add	eax,edx
	sar	eax,1
	sub	eax,16
	push	eax
	push	_30
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+56]
	add	esp,24
	push	-1
	call	_brl_graphics_Flip
	add	esp,4
_24:
	push	dword [__bb_GameConfig_kpause]
	call	_brl_polledinput_KeyHit
	add	esp,4
	cmp	eax,0
	je	_26
_25:
	push	1065353216
	call	_brl_max2d_SetAlpha
	add	esp,4
	push	0
	call	_brl_max2d_SetRotation
	add	esp,4
	push	1065353216
	push	1065353216
	call	_brl_max2d_SetScale
	add	esp,8
	call	_brl_polledinput_FlushKeys
	call	dword [_bb_TBufferedKey+56]
	mov	eax,0
	jmp	_128
_128:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_TGame_Play:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	ebx,dword [ebp+8]
	mov	edi,1
	call	_brl_max2d_Cls
	mov	eax,dword [ebx+64]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	mov	eax,dword [__bb_GameGFX_large]
	push	0
	push	255
	push	255
	push	0
	push	0
	push	_31
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,28
	mov	esi,dword [__bb_GameGFX_large]
	push	255
	push	255
	push	255
	push	20
	push	0
	push	dword [ebx+12]
	call	dword [_bb_Number+48]
	add	esp,4
	push	eax
	push	esi
	mov	eax,dword [esi]
	call	dword [eax+52]
	add	esp,28
	mov	eax,dword [__bb_GameGFX_large]
	push	0
	push	255
	push	255
	push	100
	push	0
	push	_32
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,28
	mov	esi,dword [__bb_GameGFX_large]
	push	255
	push	255
	push	255
	push	120
	push	0
	push	dword [ebx+8]
	call	_bbStringFromInt
	add	esp,4
	push	eax
	push	esi
	mov	eax,dword [esi]
	call	dword [eax+52]
	add	esp,28
	mov	eax,dword [__bb_GameGFX_large]
	push	0
	push	255
	push	255
	push	200
	push	0
	push	_33
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,28
	mov	eax,dword [__bb_GameConfig_hiscore]
	cmp	dword [ebx+12],eax
	jle	_259
	mov	eax,dword [ebx+12]
	mov	dword [__bb_GameConfig_hiscore],eax
_259:
	mov	esi,dword [__bb_GameGFX_large]
	push	255
	push	255
	push	255
	push	220
	push	0
	push	dword [__bb_GameConfig_hiscore]
	call	dword [_bb_Number+48]
	add	esp,4
	push	eax
	push	esi
	mov	eax,dword [esi]
	call	dword [eax+52]
	add	esp,28
	mov	eax,dword [ebx+52]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,4
	mov	eax,dword [ebx+48]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,4
	mov	eax,dword [ebx+16]
	cmp	dword [eax+20],0
	jne	_263
	push	27
	call	_brl_polledinput_KeyHit
	add	esp,4
	cmp	eax,0
	je	_264
	mov	edi,0
_264:
	mov	eax,dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_266
	sub	dword [ebx+20],1
	cmp	dword [ebx+20],0
	jg	_267
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+12]
	add	eax,1
	mov	dword [edx+12],eax
	mov	eax,dword [ebx+48]
	push	dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,8
	cmp	eax,0
	je	_270
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+12]
	sub	eax,1
	mov	dword [edx+12],eax
	mov	eax,dword [ebx+48]
	push	dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+80]
	add	esp,8
	add	dword [ebx+40],1
	add	dword [ebx+44],1
	cmp	dword [ebx+40],10
	jle	_272
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,4
_272:
	mov	eax,dword [ebx+84]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,4
	mov	eax,dword [ebx+16]
	cmp	dword [eax+20],0
	jne	_275
	mov	eax,dword [ebx+8]
	shl	eax,1
	add	dword [ebx+12],eax
	mov	ecx,17
	mov	eax,dword [ebx+44]
	cdq
	idiv	ecx
	mov	eax,edx
	cmp	eax,0
	sete	al
	movzx	eax,al
	push	eax
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+60]
	add	esp,8
	jmp	_277
_275:
	call	_brl_polledinput_FlushKeys
	call	dword [_bb_TBufferedKey+56]
_277:
_270:
_267:
	mov	eax,dword [ebx+68]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,4
	cmp	eax,0
	je	_279
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+8]
	sub	eax,1
	mov	dword [edx+8],eax
	mov	eax,dword [ebx+48]
	push	dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,8
	cmp	eax,0
	je	_281
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+8]
	add	eax,1
	mov	dword [edx+8],eax
_281:
_279:
	mov	eax,dword [ebx+72]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,4
	cmp	eax,0
	je	_283
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+8]
	add	eax,1
	mov	dword [edx+8],eax
	mov	eax,dword [ebx+48]
	push	dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,8
	cmp	eax,0
	je	_285
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+8]
	sub	eax,1
	mov	dword [edx+8],eax
_285:
_283:
	mov	eax,dword [ebx+80]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,4
	cmp	eax,0
	je	_287
	mov	eax,dword [ebx+48]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+72]
	add	esp,4
	mov	eax,dword [ebx+48]
	push	dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,8
	cmp	eax,0
	je	_290
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+8]
	sub	eax,1
	mov	dword [edx+8],eax
	mov	eax,dword [ebx+48]
	push	dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,8
	cmp	eax,0
	je	_292
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+8]
	add	eax,1
	mov	dword [edx+8],eax
	mov	eax,dword [ebx+48]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,4
_292:
_290:
_287:
	mov	eax,dword [ebx+76]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,4
	cmp	eax,0
	je	_295
	mov	eax,dword [ebx+48]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,4
	mov	eax,dword [ebx+48]
	push	dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,8
	cmp	eax,0
	je	_298
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+8]
	add	eax,1
	mov	dword [edx+8],eax
	mov	eax,dword [ebx+48]
	push	dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,8
	cmp	eax,0
	je	_300
	mov	edx,dword [ebx+48]
	mov	eax,dword [ebx+48]
	mov	eax,dword [eax+8]
	sub	eax,1
	mov	dword [edx+8],eax
	mov	eax,dword [ebx+48]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+72]
	add	esp,4
_300:
_298:
_295:
	mov	eax,dword [ebx+84]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,4
	cmp	eax,0
	je	_303
	mov	dword [ebx+20],0
_303:
	jmp	_304
_266:
	call	dword [_bb_TBufferedKey+60]
_304:
	mov	eax,dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+80]
	add	esp,4
	imul	eax,dword [ebx+8]
	imul	eax,20
	add	dword [ebx+12],eax
	jmp	_306
_263:
	mov	eax,dword [ebx+16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+80]
	add	esp,4
	fld	qword [ebx+24]
	sub	esp,4
	fstp	dword [esp]
	call	_brl_max2d_SetAlpha
	add	esp,4
	push	255
	push	255
	push	255
	call	_brl_max2d_SetColor
	add	esp,12
	push	0
	call	_brl_graphics_GraphicsHeight
	cdq
	and	edx,1
	add	eax,edx
	sar	eax,1
	mov	dword [ebp+-4],eax
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	call	_brl_graphics_GraphicsWidth
	cdq
	and	edx,1
	add	eax,edx
	sar	eax,1
	mov	dword [ebp+-4],eax
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	push	dword [__bb_GameGFX_gameover]
	call	_brl_max2d_DrawImage
	add	esp,16
	push	1065353216
	call	_brl_max2d_SetAlpha
	add	esp,4
	fld	qword [ebx+24]
	fadd	qword [ebx+32]
	fstp	qword [ebx+24]
	fld	qword [ebx+24]
	fld	qword [_379]
	fxch	st1
	fucompp
	fnstsw	ax
	sahf
	setbe	al
	movzx	eax,al
	cmp	eax,0
	je	_308
	fld	qword [ebx+32]
	fldz
	fxch	st1
	fucompp
	fnstsw	ax
	sahf
	setb	al
	movzx	eax,al
_308:
	cmp	eax,0
	jne	_312
	fld	qword [ebx+24]
	fld1
	fxch	st1
	fucompp
	fnstsw	ax
	sahf
	setae	al
	movzx	eax,al
	cmp	eax,0
	je	_310
	fld	qword [ebx+32]
	fldz
	fxch	st1
	fucompp
	fnstsw	ax
	sahf
	seta	al
	movzx	eax,al
_310:
_312:
	cmp	eax,0
	je	_314
	fld	qword [ebx+24]
	sub	esp,8
	fstp	qword [esp]
	fld1
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMin
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	fldz
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMax
	add	esp,16
	fstp	qword [ebx+24]
	fld	qword [ebx+32]
	fchs
	fstp	qword [ebx+32]
_314:
	push	13
	call	_brl_polledinput_KeyHit
	add	esp,4
	cmp	eax,0
	jne	_315
	push	27
	call	_brl_polledinput_KeyHit
	add	esp,4
_315:
	cmp	eax,0
	je	_317
	mov	edi,0
_317:
_306:
	call	dword [_bb_Particles+64]
	call	dword [_bb_ExplosionParticles+60]
	call	dword [_bb_TextParticles+64]
	push	dword [__bb_GameConfig_kpause]
	call	_brl_polledinput_KeyHit
	add	esp,4
	cmp	eax,0
	je	_318
	mov	eax,dword [ebx+16]
	mov	eax,dword [eax+20]
	cmp	eax,0
	sete	al
	movzx	eax,al
_318:
	cmp	eax,0
	je	_320
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,4
_320:
	call	dword [_bb_Sound+64]
	cmp	dword [ebx+60],_bbNullObject
	je	_322
	mov	eax,dword [ebx+60]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,4
	cmp	eax,0
	je	_324
	mov	eax,dword [ebx+60]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,4
	jmp	_326
_324:
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+60]
	dec	dword [eax+4]
	jnz	_330
	push	eax
	call	_bbGCFree
	add	esp,4
_330:
	mov	dword [ebx+60],esi
_326:
_322:
	push	-1
	call	_brl_graphics_Flip
	add	esp,4
	mov	eax,edi
	jmp	_131
_131:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
	section	"data" data writeable align 8
	align	4
_133:
	dd	0
	align	4
__bb_TBufferedKey_list:
	dd	_bbNullObject
_35:
	db	"TBufferedKey",0
_36:
	db	"key",0
_37:
	db	"i",0
_38:
	db	"del",0
_39:
	db	"cnt",0
_40:
	db	"New",0
_41:
	db	"()i",0
_42:
	db	"Delete",0
_43:
	db	"Clear",0
_44:
	db	"Create",0
_45:
	db	"(i,i):TBufferedKey",0
_46:
	db	"Flush",0
_47:
	db	"Idle",0
_48:
	db	"ForceRelease",0
_49:
	db	"Poll",0
	align	4
_34:
	dd	2
	dd	_35
	dd	3
	dd	_36
	dd	_37
	dd	8
	dd	3
	dd	_38
	dd	_37
	dd	12
	dd	3
	dd	_39
	dd	_37
	dd	16
	dd	6
	dd	_40
	dd	_41
	dd	16
	dd	6
	dd	_42
	dd	_41
	dd	20
	dd	7
	dd	_43
	dd	_41
	dd	48
	dd	7
	dd	_44
	dd	_45
	dd	52
	dd	7
	dd	_46
	dd	_41
	dd	56
	dd	7
	dd	_47
	dd	_41
	dd	60
	dd	6
	dd	_48
	dd	_41
	dd	64
	dd	6
	dd	_49
	dd	_41
	dd	68
	dd	0
	align	4
_bb_TBufferedKey:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_34
	dd	20
	dd	__bb_TBufferedKey_New
	dd	__bb_TBufferedKey_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__bb_TBufferedKey_Clear
	dd	__bb_TBufferedKey_Create
	dd	__bb_TBufferedKey_Flush
	dd	__bb_TBufferedKey_Idle
	dd	__bb_TBufferedKey_ForceRelease
	dd	__bb_TBufferedKey_Poll
_51:
	db	"TGame",0
_52:
	db	"level",0
_53:
	db	"score",0
_54:
	db	"gm",0
_55:
	db	":TGameMap",0
_56:
	db	"timer",0
_57:
	db	"alpha",0
_58:
	db	"d",0
_59:
	db	"alphainc",0
_60:
	db	"count",0
_61:
	db	"total",0
_62:
	db	"block",0
_63:
	db	":TPiece",0
_64:
	db	"nextblock",0
_65:
	db	"drop",0
_66:
	db	"fade",0
_67:
	db	":TFadeScreen",0
_68:
	db	"bdrop",0
_69:
	db	":TGameBackdrop",0
_70:
	db	"kleft",0
_71:
	db	":TBufferedKey",0
_72:
	db	"kright",0
_73:
	db	"krotleft",0
_74:
	db	"krotright",0
_75:
	db	"kdrop",0
_76:
	db	"SetInitLevel",0
_77:
	db	"(i)i",0
_78:
	db	"SetTimer",0
_79:
	db	"LevelUp",0
_80:
	db	"CreateNext",0
_81:
	db	"Pause",0
_82:
	db	"Play",0
	align	4
_50:
	dd	2
	dd	_51
	dd	3
	dd	_52
	dd	_37
	dd	8
	dd	3
	dd	_53
	dd	_37
	dd	12
	dd	3
	dd	_54
	dd	_55
	dd	16
	dd	3
	dd	_56
	dd	_37
	dd	20
	dd	3
	dd	_57
	dd	_58
	dd	24
	dd	3
	dd	_59
	dd	_58
	dd	32
	dd	3
	dd	_60
	dd	_37
	dd	40
	dd	3
	dd	_61
	dd	_37
	dd	44
	dd	3
	dd	_62
	dd	_63
	dd	48
	dd	3
	dd	_64
	dd	_63
	dd	52
	dd	3
	dd	_65
	dd	_37
	dd	56
	dd	3
	dd	_66
	dd	_67
	dd	60
	dd	3
	dd	_68
	dd	_69
	dd	64
	dd	3
	dd	_70
	dd	_71
	dd	68
	dd	3
	dd	_72
	dd	_71
	dd	72
	dd	3
	dd	_73
	dd	_71
	dd	76
	dd	3
	dd	_74
	dd	_71
	dd	80
	dd	3
	dd	_75
	dd	_71
	dd	84
	dd	6
	dd	_40
	dd	_41
	dd	16
	dd	6
	dd	_42
	dd	_41
	dd	20
	dd	6
	dd	_76
	dd	_77
	dd	48
	dd	6
	dd	_78
	dd	_41
	dd	52
	dd	6
	dd	_79
	dd	_41
	dd	56
	dd	6
	dd	_80
	dd	_77
	dd	60
	dd	6
	dd	_81
	dd	_41
	dd	64
	dd	6
	dd	_82
	dd	_41
	dd	68
	dd	0
	align	4
_bb_TGame:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_50
	dd	88
	dd	__bb_TGame_New
	dd	__bb_TGame_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__bb_TGame_SetInitLevel
	dd	__bb_TGame_SetTimer
	dd	__bb_TGame_LevelUp
	dd	__bb_TGame_CreateNext
	dd	__bb_TGame_Pause
	dd	__bb_TGame_Play
	align	8
_357:
	dd	0x40000000,0x3f847ae1
	align	8
_371:
	dd	0x40000000,0x3fd33333
	align	8
_372:
	dd	0x0,0x40000000
	align	8
_373:
	dd	0x0,0x40000000
	align	8
_374:
	dd	0xa0000000,0x3fb99999
	align	4
_30:
	dd	_bbStringClass
	dd	2147483647
	dd	6
	dw	80,65,85,83,69,68
	align	4
_31:
	dd	_bbStringClass
	dd	2147483647
	dd	5
	dw	83,67,79,82,69
	align	4
_32:
	dd	_bbStringClass
	dd	2147483647
	dd	5
	dw	76,69,86,69,76
	align	4
_33:
	dd	_bbStringClass
	dd	2147483647
	dd	7
	dw	72,73,83,67,79,82,69
	align	8
_379:
	dd	0x60000000,0x3fe66666
