
.macro lolprint txt
stmfd sp!, {r0}
add r0, pc, #4
swi #0xFC0000
b 1f
.ascii "\txt"
.byte 0x0A
.byte 0
.align 4
1:
ldmfd sp!, {r0}
.endm


nsub_020D5AC4_ov_0A:
	stmfd sp!, {r4,lr}
	mov r0, #0x400
	bl allocFromGameHeap
	movs r4, r0
	beq s100_ctor_end
	bl EnemyActor_ctor
	ldr r0, =s100_vtable
	str r0, [r4]
s100_ctor_end:
	mov r0, r4
	ldmfd sp!, {r4,pc}
	

s100_null:
	bx lr


.global s100_something

s100_something:
	stmfd sp!, {lr}
	lolprint "s100_something"
	@bl 0x020E2018
	ldmfd sp!, {pc}
	
	
s100_init:
	stmfd sp!, {r4,lr}
	mov r4, r0

	@ is that really needed? dunno.
	ldr r2, =mainHeapHandle
	ldr r2, [r2]
	mov r1, #0x40
	ldr r3, [r0]
	ldr r3, [r3,#0x34]
	blx r3
	
	mov r0, r4
	bl s100_loadtex
	
	@bl 0x020D5954
	mov r0, #1
	ldmfd sp!, {r4,pc}
	

s100_delete:
	stmfd sp!, {r4,lr}
	mov r4, r0
	bl s100_unloadtex
	mov r0, r4
	bl base_onDelete
	ldmfd sp!, {r4,pc}


s100_vtable:
	.long s100_init
	.long actor_beforeCreate
	.long actor_afterCreate
	.long s100_delete
	.long actor_beforeDelete
	.long actor_afterDelete
	.long enemyActor_execute
	.long enemyActor_beforeExecute
	.long enemyActor_afterExecute
	.long s100_draw
	.long enemyActor_beforeDraw
	.long actor_afterDraw
	.long base_willBeDeleted
	.long base_moreHeapShit
	.long base_createHeap
	.long base_heapCreated
	.long 0x020D5894
	.long 0x020D58F0
	.long actor_getSomething
	.long actor_incrementSomething
	.long s100_update_state0
	.long 0x0209AD1C
	.long s100_update_state1
	.long enemyActor_executeState2
	.long enemyActor_executeState3
	.long enemyActor_executeState4
	.long enemyActor_executeState5
	.long enemyActor_executeState6
	.long enemyActor_executeState7
	.long enemyActor_executeState8
	.long enemyActor_executeState9
	.long s100_null
	.long 0x0209FAF4
	.long 0x0209FAAC
	.long 0x0209C974
	.long 0x020A012C
	.long 0x020A00AC
	.long 0x0209F574	@ sets state=9
	.long 0x0209F3D8
	.long 0x0209F354	@ sets state=0
	.long enemyActor_executeAllStates
	.long 0x0209D988
	.long 0x0209D920
	.long 0x0209D84C
	.long 0x0209D568
	.long 0x0209D43C
	.long 0x0209D2A0
	.long 0x0209D158
	.long 0x0209D014
	.long s100_null
	.long 0x0209CE08
	.long 0x0209CBF8
	.long 0x0209CAD0
	.long 0x02098F7C
	.long 0x02098E7C
	.long 0x0209CD3C
	.long 0x0209CAC4
	.long s100_null
	.long 0x02099168
	.long 0x02098A94
	.long s100_something	@ called when sprite killed by bottom/block?
	.long 0x02098A10
	.long 0x0209C9D0	@ sets state=2
	.long 0x0209C994	@ sets state=3
	.long 0x020A0268
	.long 0x020A0240
	.long 0x0209A6D4