In this beta, the door does not disappear, nor does it "take away" his keycard (as a door in the level will). But I could make it do one of these instead if it was desirable, or if it would make level design easier. I could also change it so that it checked the "goal items" instead of keycards, if that was preferable.
I've combined this with the teleport-within-level patch, as it left plenty of spare code room, and I thought they could work well together. But if this is very undesirable, I might be able to find 39 code bytes elsewhere...
Code: Select all
%ext ck1
%version 1.31
# Change the teleporter so it works within the level
%patch $8919 $89 $F0 $F7 $2E $08 $6C $01
$F8 $D1 $E0 $C4 $1E $4C $6C $01 $C3 $26 $8B $17 $B1 $04 $31 $C0
$A3 $DE $6E $A3 $E0 $6E $A3 $E2 $6E $A3 $E4 $6E $88 $F0 $98 $01
$F0 $D3 $E0 $A3 $E3 $6E $88 $D0 $98 $01 $F8 $D3 $E0 $A3 $DF $6E
$8B $16 $DE $6E $A1 $E0 $6E $81 $C2 $00 $70 $15 $FF $FF $89 $16
$D0 $6E $A3 $D2 $6E $8B $16 $E2 $6E $A1 $E4 $6E $81 $C2 $00 $B0
$15 $FF $FF $89 $16 $D4 $6E $A3 $D6 $6E $C3
%patch $4572 $E8 $A4 $43 $EB $13 $90
# Our map-door-checking function
%patch $897B $3D $00 $00 $9F $88
$E0 $8B $9F $6E $05 $83 $EB $02 $7C $0F $83 $FB $03 $7F $0A $D1
$E3 $83 $BF $9E $AA $01 $9F $08 $C4 $9E $74 $05 $58 $05 $1A $00
$50 $C3
# Call the map-door-checking function from appropriate spots
%patch $A71B $8B $87 $34 $0A $E8 $59 $E2
%patch $A808 $8B $87 $C0 $13 $E8 $6C $E1
%patch $A933 $8B $87 $86 $18 $E8 $41 $E0
%patch $AA20 $8B $87 $FA $0E $E8 $54 $DF
%end