- Messages
- 27
if you are looking for a way to import s3k manager but your dis is too bad and doesnt really let you shift the varables around you can just modfy DisplaySprite routine by making a table that takes the priority id and then turns d0 into a word then you just add whatever is in d0 into a1 that being the sprite input table example :
that should work for the rest of DisplaySprite routines im not gonna show you cuz this isnt a copy paste guide lmao =P if by chance you want the og s3k Display routine that has a feature to display subsprites without using DisplaySprite3 from s2 there you go
Code:
DisplaySprite:
lea (Sprite_Table_Input).w,a1
moveq #0,d0
move.b priority(a0),d0
add.w d0,d0
move.w PriorityId(pc,d0.w),d0 ; get values
adda.w d0,a1
cmpi.w #$7E,(a1)
bcc.s return_16510
addq.w #2,(a1)
adda.w (a1),a1
move.w a0,(a1)
return_16510:
rts
; End of function DisplaySprite
PriorityId: dc.w 0
dc.w $80
dc.w $100
dc.w $180
dc.w $200
dc.w $280
dc.w $300
dc.w $380
Code:
Draw_Sprite:
lea (Sprite_table_input).w,a1
moveq #0,d0
move.b priority(a1),d0
add.w d0,d0
move.w PriorityId(pc,d0.w),d0 ; get values
adda.w d0,a1
loc_1ABCE:
cmpi.w #$7E,(a1)
bhs.s loc_1ABDC
addq.w #2,(a1)
adda.w (a1),a1
move.w a0,(a1)
locret_1ABDA:
rts
; ---------------------------------------------------------------------------
loc_1ABDC:
cmpa.w #Sprite_table_input+($80*7),a1
beq.s locret_1ABDA
adda.w #$80,a1
bra.s loc_1ABCE
; End of function Draw_Sprite
Last edited: