Prev: C0A3 Up: Map Next: C107
C0C1: Place/replace Maroc in the start room
Used by the routine at C099.
This routine is launched:
  • after the short intro sequence that runs after starting a new game
  • when Maroc has run out of energy
The routine plays the theme music, resets some of Maroc's game data and returns him to the start room.
PLAY INTRO MUSIC
C0C1 LD A,$01 Set flag indicating which music data to point to (1 = main theme music). The music data is stored at EBF0.
C0C3 CALL $E5B6 Play music
RESET GAME DATA
C0C6 LD A,$FF
C0C8 LD ($EBB4),A Decrementing timer before a warlock might appear in Maroc's room
C0CB LD ($EBB5),A Decrementing timer before a creature might wander into the room from an adjacent one
C0CE LD A,$80
C0D0 LD ($EAE0),A Maroc's energy - maximum is 255 but he starts with half a full energy bar
C0D3 LD A,$00
C0D5 LD ($EC9C),A FREEZE spell timer (0 = FREEZE spell not active)
C0D8 LD ($ECA1),A Maroc's height offset (his movement speed affects his height above his shadow)
C0DB LD ($EAE1),A Spell selection byte - start in spell menu, with no spell selected
C0DE LD ($EAEC),A Temp store for spell number pointer. Only the MOVE spell is available at the start of the game
C0E1 LD ($EBD5),A Energy drain/heal amount for ongoing effect spells, e.g. SHIELD (drain) or CHALICE (heal)
C0E4 LD ($EAE9),A Currently active 'effect' spell (e.g. UNSEEN, SHIELD)
C0E7 LD ($EAE2),A Store for spell counter used in checking spells collected at E6BE
C0EA LD A,$4A Maroc's vertical (Y-axis) screen position, in pixels, from top of play area just below border
C0EC LD ($EAC1),A
C0EF LD A,$47 Maroc's default colour attributes (71 = INK 7, PAPER 0, BRIGHT 1)
C0F1 LD ($EAA7),A
C0F4 LD A,$40 Maroc's vertical pixel starting position in the room
C0F6 LD ($EB74),A
C0F9 LD A,$01
C0FB LD ($EAB4),A The connecting door set number in the table at 6790 (set 1)
C0FE LD ($EAB7),A Room number = 1
C101 LD HL,($EB65) Memory address pointer for spell list data at 6DFC
C104 LD ($EAE3),HL Copy to spell name pointer buffer
Prev: C0A3 Up: Map Next: C107