1; void __CALLEE__ sp1_ChangeSprType_callee(struct sp1_cs *c, void *drawf) 2; 01.2008 aralbrec, Sprite Pack v3.0 3; ts2068 hi-res version 4 5PUBLIC sp1_ChangeSprType_callee 6PUBLIC ASMDISP_SP1_CHANGESPRTYPE_CALLEE 7 8.sp1_ChangeSprType_callee 9 10 pop hl 11 pop de 12 ex (sp),hl 13 14.asmentry 15 16; Change the type of a sprite char struct so that it draws using 17; a different draw function. If the occluding flag is changed, 18; make sure the sprite char struct is off screen before calling. 19; 20; enter : hl = struct sp1_cs * 21; de = address of sprite draw function 22; uses : af, bc, de, hl 23 24.SP1ChangeSprType 25 26 ld bc,8 27 add hl,bc 28 ex de,hl ; de = & struct sp1_CS.draw_code, hl = & draw function 29 ld bc,-10 30 add hl,bc ; hl = & draw function data 31 32 ldi ; copy draw code into struct sp1_cs.draw_code 33 inc hl ; but skip over graphic pointers 34 inc hl 35 inc de 36 inc de 37 ldi 38 ldi 39 inc hl 40 inc hl 41 inc de 42 inc de 43 ldi 44 ldi 45 ldi 46 47 ret 48 49DEFC ASMDISP_SP1_CHANGESPRTYPE_CALLEE = asmentry - sp1_ChangeSprType_callee 50