All pastes #751878 Raw Edit

Miscellany

public text v1 · immutable
#751878 ·published 2007-10-27 20:28 UTC
rendered paste body
Obj_CirclingPlatforms:	
	moveq	#0,d0
	move.b	$24(a0),d0
	move.w	Obj_CirclingPlatforms_Index(pc,d0.w),d1
	jsr	Obj_CirclingPlatforms_Index(pc,d1.w)
	move.w	$32(a0),d0
	andi.w	#$FF80,d0
	move.w	($FFFFEE00).w,d1
	sub.w	#$80,d1
	andi.w	#$FF80,d1
	sub.w	d1,d0
	cmp.w	#$280,d0
	jhi	DeleteObject
	jmp	DisplaySprite
; ===========================================================================
Obj_CirclingPlatforms_Index:	dc.w Obj_CirclingPlatforms_Main-Obj_CirclingPlatforms_Index
	dc.w Obj_CirclingPlatforms_Platform-Obj_CirclingPlatforms_Index
	dc.w Obj_CirclingPlatforms_Action-Obj_CirclingPlatforms_Index
; ===========================================================================
Obj_CirclingPlatforms_Main:	
	addq.b	#2,$24(a0)
	move.l	#Map_Obj_CirclingPlatforms,4(a0)
	move.w	#$4000,2(a0)
	move.b	#4,1(a0)
	move.b	#4,$18(a0)
	move.b	#$18,$19(a0)
	move.w	8(a0),$32(a0)
	move.w	$C(a0),$30(a0)
Obj_CirclingPlatforms_Platform:	
	moveq	#0,d1
	move.b	$19(a0),d1
	lea	($FFFFB000).w,a1
	jsr	(PlatformObject).l
	jmp	Obj_CirclingPlatforms_Types
; ===========================================================================
Obj_CirclingPlatforms_Action:	
	moveq	#0,d1
	move.b	$19(a0),d1
	jsr	(ExitPlatform).l
	move.w	8(a0),-(sp)
	jsr	Obj_CirclingPlatforms_TYPES
		
	move.w	(sp)+,d2
	lea	($FFFFB000).w,a1

	jmp	(MvSonicOnPtfm).l
; ===========================================================================
Obj_CirclingPlatforms_Types:
	moveq	#0,d0
	move.b	$28(a0),d0
	andi.w	#$C,d0
	lsr.w	#1,d0
	move.w	Obj_CirclingPlatforms_TypeIndex(pc,d0.w),d1
	jmp	Obj_CirclingPlatforms_TypeIndex(pc,d1.w)
; ===========================================================================
Obj_CirclingPlatforms_TypeIndex:dc.w Obj_CirclingPlatforms_Type00-Obj_CirclingPlatforms_TypeIndex
	dc.w Obj_CirclingPlatforms_Type04-Obj_CirclingPlatforms_TypeIndex
; ===========================================================================
Obj_CirclingPlatforms_Type00:	
	move.b	($FFFFFE80).w,d1
	subi.b	#$50,d1
	ext.w	d1
	move.b	($FFFFFE84).w,d2
	subi.b	#$50,d2
	ext.w	d2
	btst	#0,$28(a0)
	beq.s	loc1_10E24
	neg.w	d1
	neg.w	d2
loc1_10E24:
	btst	#1,$28(a0)
	beq.s	loc1_10E30
	neg.w	d1
	exg	d1,d2
loc1_10E30:
	add.w	$32(a0),d1
	move.w	d1,8(a0)
	add.w	$30(a0),d2
	move.w	d2,$C(a0)
	rts	
; ===========================================================================
Obj_CirclingPlatforms_Type04:	
	move.b	($FFFFFE80).w,d1
	subi.b	#$50,d1
	ext.w	d1
	move.b	($FFFFFE84).w,d2
	subi.b	#$50,d2
	ext.w	d2
	btst	#0,$28(a0)
	beq.s	loc1_10E62
	neg.w	d1
	neg.w	d2
loc1_10E62:
	btst	#1,$28(a0)
	beq.s	loc1_10E6E
	neg.w	d1
	exg	d1,d2
loc1_10E6E:
	neg.w	d1
	add.w	$32(a0),d1
	move.w	d1,8(a0)
	add.w	$30(a0),d2
	move.w	d2,$C(a0)
	rts	

Map_Obj_CirclingPlatforms:	binclude	"mappings/sprite/circlingplatform.bin"
	even