Skip to content

Instantly share code, notes, and snippets.

@bigfarts
Created November 8, 2022 04:06
Show Gist options
  • Select an option

  • Save bigfarts/b46967efceda25d05d32f6a3ae93dbd9 to your computer and use it in GitHub Desktop.

Select an option

Save bigfarts/b46967efceda25d05d32f6a3ae93dbd9 to your computer and use it in GitHub Desktop.
; license: be gay do crime
.gba
.open "bn1.gba", 0x08000000
.org 0x080566e8
bl conditional_flashing
.org 0x080566ec
bl conditional_flinching
.macro HDMG,dest
ldr dest, [r5, 0x74]
ldrh dest, [dest, 0x2a]
.endmacro
.org 0x08160ac4
conditional_flashing:
mov r0, 0
HDMG r1
cmp r1, 100
blt no_flashing
mov r0, 0x4e
no_flashing:
strb r0, [r7, 0x0]
mov pc, lr
conditional_flinching:
mov r0, 5
HDMG r1
cmp r1, 10
blt no_flinching
ldrb r0, [r7, 0xb]
no_flinching:
cmp r0, 5
mov pc, lr
.close
@bigfarts
Copy link
Author

bigfarts commented Nov 8, 2022

Ñ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment