If you've blocked our ad, please consider unblocking it.
We promise it isn't annoying. No flash, no sound, ever.

Ads by Project Wonderful! Your ad here, right now: $0

Firetrap (Amstrad CPC)

From The Cutting Room Floor
Jump to: navigation, search

Title Screen

Firetrap

Developer: SOURCE
Publisher: Activision
Platform: Amstrad CPC
Released in EU: 1987


SourceIcon.png This game has uncompiled source code.


Source Code Fragments

A moderate amount of code was left inside the disk version of the game. The addresses below are from a dump of the original disk.

Track 6, Sector 0, AF9:

MVFL.2	INC	HL
	INC	HL
	INC	HL
	DJNZ	MVFL.1
	RET

ZIBBO	EQU	274

NEW_FLAME	LD	A,(NUM_FLAM)
	CP	4
	RET	Z
	LD	A,(HEIGHT)
	OR	A
	CP	#60
	RET	NC
	CALL	RND
	OR	A
	CP	220
FOZZIE	EQU	$-1
	RET	C
	CALL	RND
	AND	7
	LD	(ZIBBO),A
	ADD	A,A
	ADD	A,A
	ADD	A,A
	ADD	A,8
	LD	C,A
	CALL	RND
	AND	32
	LD	B,A
;	PUSH	BC
;	LD	A,8
;	ADD	A,B
;	LD	B,A
;	CALL	MAP_FIND
;	POP	BC
;	RET	NZ
	LD	A,(MAP_COUNT)
	LD	L,A
	LD	A,3
	SUB	L
	ADD	A,A
	ADD	A,A
	ADD	A,A
	ADD	A,B
	LD	B,A
	LD	A,(ZIBBO)
	LD	HL,ZIBBER
KERMIT	EQU	$-2
	ADD	A,L
	LD	L,A
	LD	A,(HL)
	ADD	A,B
	LD	B,A
	PUSH	BC
	XOR	A
	CALL	MAP_FIND
	POP	BC
	RET	NZ
	LD	HL,FLAMES
	LD	D,4
NEWF.1	LD	A,(HL)
	OR	A
	JR	NZ,NEWF.2
	LD	(HL),20
	INC	HL
	LD	(HL),C
	INC	HL
	LD	A,B
	SUB	16
	LD	B,A
	LD	(HL),B
	LD	HL,NUM_FLAM
	INC	(HL)
	RET
NEWF.2	INC	HL
	INC	HL
	INC	HL
	DEC	D
	JP	NZ,NEWF.1
	RET

FLAME_DO	LD	A,15
	LD	(SPMASK),A
	EXX
	LD	HL,FLAME_STR
	EXX
	LD	HL,FLAMES
	LD	D,4
FLOD.1	LD	A,(HL)
	OR	A
	JR	Z,FLOD.2
	EXX
	PUSH	HL
	EXX
	PUSH	HL
	PUSH	DE
	LD	A,(HL)
	XOR	1
	LD	(HL),A
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	CALL	SP_DRAW
	POP	DE
	POP	HL
	EXX
	POP	HL
	EXX
FLOD.2	EXX
	INC	H
	EXX
	INC	HL
	INC	HL
	INC	HL
	DEC	D
	JP	NZ,FLOD.1
	RET

WIPE_FLAME	LD	DE,FLAME_

Track 7, Sector 0, 0:

	LD	A,4
	LD	HL,FLAMES+9
FLIP.1	PUSH	AF
	PUSH	HL
	LD	A,(HL)
	OR	A
	JR	Z,FLIP.2
	PUSH	DE
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	CALL	SP_WIPE
	POP	DE
FLIP.2	DEC	D
	POP	HL
	DEC	HL
	DEC	HL
	DEC	HL
	POP	AF
	DEC	A
	JP	NZ,FLIP:

Track 8, Sector 0, 145:

-ball from flames

FALLERS2	CALL	RND
	OR	A
	CP	220
	RET	C
	CALL	RND
	AND	3
	LD	HL,FLAMES
	LD	D,A
	ADD	A,A
	ADD	A,D
	ADD	A,L
	LD	L,A
	LD	A,(HL)
	OR	A
	RET	Z
	INC	HL
	LD	C,(HL)
	INC	C
	INC	C
	INC	HL
	LD	B,(HL)
	LD	HL,SPRITE_DAT+9
	LD	E,5
FAL.2A	LD	A,(HL)
	INC	A
	JR	Z,FAL.3A
	INC	HL
	INC	HL
	INC	HL
	DEC	E
	JP	NZ,FAL.2A
	RET
FAL.3A	SET	7,C
	LD	(HL),C
	INC	HL
	LD	(HL),B
	INC	HL
	LD	(HL),11 ; fire-ball code
	RET

BIGGY	EQU	278
BIG_STORE	DEFS	256

BIG_FALL	LD	A,(BIGGY)

Track 9, Sector 0, 10B:

	OR	A
	JP	Z,POP.1
	LD	B,6
	L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