I think I'll work on refining the gameplay and graphics before I start on stuff like the demos, Gens Movie looks interesting though, might be useful for presenting my projects later on as well.
Anyway, I've been trying to work on making the high jump code, however no effect so far. This is the ASM routine I currently have (put in the Md_Normal section):
CODE
; ---------------------------------------------------------------------------
; Subroutine allowing Sonic to high jump
; ---------------------------------------------------------------------------
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
Sonic_HighJump:
move.b ($FFFFF603).w,d0; move the current button press to d0
btst #1,($FFFFF602).w; is Down button pressed?
beq.b HJ_End; if not, return
and.b #$40,d0; get only button A
cmp.b #$40,d0; were A pressed?
bne.s HJ_End; if not, branch
tst.b ($FFFFFFA8).w; was jumpdash flag set?
bne.w HJ_End; if yes, branch
move.b #$24,($FFFFFFA8).w; if not, set jumpdash flag
move.b #$23,$1C(a0); show hammer animation
move.w #$A0,d0; set jumpdash sound
jsr (PlaySound).l; play jumpdash sound
bclr #4,$24(a0); clear double jump flag
move.w #-$600,$12(a0); set normal jumpdash speed
tst.b ($FFFFFE2E).w; do you have speed shoes?
beq.s HJ_ChkUW; if not, branch
move.w #-$600,$12(a0); set speed shoes jumpdash speed
HJ_ChkUW:
btst #6,$24(a0); is Sonic underwater?
beq.s HJ_ChkDirection; if not, branch
move.w #-$400,d0; set underwater jumpdash speed
HJ_ChkDirection:
btst #0,$24(a0); is sonic facing left?
beq.s HJ_Move; if yes, branch
neg.w d0; if not, negate d0 (for jumping to the right)
HJ_Move:
move.w #-$600,$12(a0); move sonic forward (y-velocity)
HJ_End:
rts ; return
; End of function Sonic_HighJump
It's modified from the jump dash code, however I used a different flag since the spinhammer uses it too.
All I get is a jump noise when pressing Down and A, suggesting it recognises the code at least (however it only does once on ground, I have to go off and on ground again for it to activate). Anyone got any ideas?
Since the leap code works in a similar manner (likely just a bit of a toggle with the vertical and horizontal directions) it would likely be a two-for-one-bonus if I get it to work.
This post has been edited by E-122-Psi: 02 March 2010 - 03:27 PM