Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Follow_player: ; gets a angle via the arctan function and sends the attack torwards the player
- push hl \ inc sp ; move the stack back to proper positions as we
- ld hl,0 ; are moving it into temp storage
- add hl,sp
- ld sp,(itemp1) ; old stack value was stored here
- push hl ; we have a stack now lets use it
- ex af,af' ; needed this last time dont ask me why
- push af ; save the shadow aff for some bloody reason
- ld hl,(chary) ; de = your pos
- srl h \ srl h
- srl l \ srl l
- ex de,hl
- call r.arctan ; returns angle in c and a
- ; we leave it there so we can restore the stack
- pop af
- ex af,af'
- pop hl
- ld sp,hl
- ld a,c ; put angle in a
- pop de
- push de ; restore xy
- jp moveang
- ; we can do my own shit now stack is inited and old one is saved
Advertisement
Add Comment
Please, Sign In to add comment