.gba
.open "zm.gba","BlockTankRemoveImprovement.gba",0x8000000

.org 0x8059542	;Never Reform Blocks
	ldrb r0,[r4,1h]
	bl FreeSpace1
	cmp r0,1h
;	bne 8059570h

.org 0x8059560	;Never Reform Blocks
	lsl r4,r7,2h	;Change ram adress in pool

.org 0x805B152	;Tanks
	bl FreeSpace2
	cmp r0,1h
;	bne 805B1C0h

.org 0x805B1A8	;Tanks
	lsl r4,r7,2h	;Change ram adress in pool
	
.org 0x8304054	;Unused Crocomire Gfx
FreeSpace1:
	push r14
	mov r5,r8
	mov r8,r1
	bl FreeSpace2
	mov r8,r5
	mov r5,0h
	pop r2
	bx r2

FreeSpace2:
	ldr r1,=3000054h;	current area
	ldrb r1,[r1]
	lsl r1,r1,2h
	ldr r2,=875FAC4h;	room entry pointer
	add r3,r2,r1
	ldr r3,[r3]
	lsl r1,r0,6h
	lsl r2,r0,2h
	sub r0,r1,r2
	add r1,r3,r0
	mov r0,r8
	ldrh r2,[r0,0Eh]
	mov r0,35h
	add r3,r1,r0
	ldrb r1,[r3]
	ldrb r0,[r3,1h]
	lsl r0,r0,8h
	add r3,r0,r1
	cmp r2,r3
	beq ReturnYes
	mov r0,0h
	b ReturnNo
ReturnYes:
	mov r0,1h
ReturnNo:
	bx r14
	
.pool
.close
	