set_play_time.asm
Adex-8x_EoS-ASM-Effects/special_processes/set_play_time.asm
; ------------------------------------------------------------------------------
; Set Play Time
; Changes the Play Time!
; Param 1: time_in_seconds
; Returns: Nothing
; ------------------------------------------------------------------------------

.relativeinclude on
.nds
.arm

; Uncomment/comment the following labels depending on your version.

.definelabel MaxSize, 0x810

; For US
.include "lib/stdlib_us.asm"
.definelabel ProcStartAddress, 0x022E7248
.definelabel ProcJumpAddress, 0x022E7AC0
.definelabel AssemblyPointer, 0x020B0A48

; For EU
;.include "lib/stdlib_eu.asm"
;.definelabel ProcStartAddress, 0x022E7B88
;.definelabel ProcJumpAddress, 0x022E8400
;.definelabel AssemblyPointer, 0x020B138C

; File creation
.create "./code_out.bin", 0x022E7248 ; For EU: 0x022E7B88
	.org ProcStartAddress
	.area MaxSize

		ldr r0,=AssemblyPointer
		ldr r0,[r0]
		sub r0,r0,#0x700
		sub r0,r0,#0x4c
		str r7,[r0]
		b ProcJumpAddress
		.pool
	.endarea
.close