Routines 
Prev: FBA0  Up: Map  Next: FC30 
FBCC  LD HL,$7FED  7FED holds ERIC's secondary status flags  
FBCF  BIT 6,(HL)  Has ERIC already begun his descent?  
FBD1  JR NZ,$FC01  Jump if so  
ERIC has not begun his descent yet, which means we need to figure out what his trajectory will be first.


FBD3  LD H,$D2  0xD2=ERIC  
FBD5  CALL $61B4  Update the SRB for ERIC's current animatory state and location  
FBD8  AND $80  A=0x00 if ERIC's facing left, 0x80 if facing right  
This entry point is used by the routine at 7316 when ERIC has jumped from the saddle of the bike (with A=0x02 or 0x82, and D holding the ycoordinate of the spot above ERIC's hand).


FBDA  LD B,A  Now B=0x00 (or 0x02) if ERIC's facing left, 0x80 (or 0x82) if facing right  
FBDB  LD A,D  A=ycoordinate of ERIC (or the spot above his hand)  
FBDC  CP $11  Is ERIC on the bottom floor?  
FBDE  JR NZ,$FBE2  Jump if not  
FBE0  DEC D  D=16  
FBE1  DEC A  A=16  
FBE2  ADD A,$04  Set A=7+(y3)%7 if y<17, or 1 if y=17 (where y is ERIC's ycoordinate); this is the distance (negated) left to travel till ERIC reaches the floor  
FBE4  SUB $07  
FBE6  JR NC,$FBE4  
FBE8  ADD A,$A6  A=0x9F0xA5 (normal descent table entry pointer)  
FBEA  PUSH AF  Save this briefly  
FBEB  LD A,$05  Now A=animatory state of ERIC sitting on the floor (0x05/0x85) or with his arm up (0x07/0x87)  
FBED  ADD A,B  
FBEE  CALL $6130  Update ERIC's animatory state and location and update the SRB  
FBF1  POP AF  Restore the normal descent table entry pointer to A  
FBF2  LD H,A  Point HL at the appropriate entry (H=0x9F0xA5) in the normal descent table (L=0xFC) for ERIC's current height above the floor  
FBF3  LD L,$FC  
FBF5  LD ($7FD7),HL  Store the descent table pointer at 7FD7  
FBF8  LD HL,$7FED  7FED holds ERIC's secondary status flags  
FBFB  LD (HL),$50  Set bits 4 (ERIC is still falling) and 6 (ERIC has begun his descent)  
FBFD  LD L,$F3  Set ERIC's main action timer at 7FF3 to 7  
FBFF  LD (HL),$07  
Deal with the next phase of ERIC's descent.


FC01  LD L,$F3  HL=7FF3 (which holds ERIC's main action timer)  
FC03  DEC (HL)  Is it time to deal with ERIC yet?  
FC04  RET NZ  Return if not  
FC05  LD (HL),$03  Reset ERIC's action timer to 3  
FC07  LD L,$D8  HL=7FD7 (which holds the descent table pointer)  
FC09  INC (HL)  Collect the descent table pointer into DE  
FC0A  LD D,(HL)  
FC0B  DEC L  
FC0C  LD E,(HL)  
FC0D  LD A,(DE)  Pick up an entry from the descent table in A  
FC0E  AND A  Has ERIC landed yet?  
FC0F  JR NZ,$FC22  Jump if not  
FC11  LD L,$FB  HL=7FFB (ERIC's main status flags)  
FC13  INC D  Collect the first set of flags from the descent table  
FC14  LD A,(DE)  
FC15  LD (HL),A  Copy them into 7FFB  
FC16  INC D  Collect the second set of flags from the descent table  
FC17  LD A,(DE)  
FC18  LD L,$ED  Copy them into 7FED  
FC1A  LD (HL),A  
FC1B  AND A  Did ERIC jump from the top floor window (bit 5 set)?  
FC1C  CALL NZ,$F532  Set MR WACKER on his way to expel ERIC if so  
FC1F  JP $F2C3  Make a sound effect for ERIC's landing  
ERIC hasn't landed yet. Determine his next move through the air.


FC22  PUSH AF  Save the descent table entry briefly  
FC23  LD H,$D2  0xD2=ERIC  
FC25  CALL $61B4  Update the SRB for ERIC's current animatory state and location  
FC28  AND $80  B=0x00 if ERIC's facing left, 0x80 if facing right  
FC2A  LD B,A  
FC2B  POP AF  Restore the descent table entry to A  
FC2C  LD C,A  Copy it to C  
FC2D  JP $5D00  The routine continues at 5D00  
This routine uses a descent table to guide ERIC to the floor. The bits in each table entry have the following significance:
The descent tables themselves contain the following entries:

Prev: FBA0  Up: Map  Next: FC30 