Prev: 49315 Up: Map Next: 49415
49345: Place/replace Maroc in the start room
Used by the routine at 49305.
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
49345 LD A,1 Set flag indicating which music data to point to (1 = main theme music). The music data is stored at 60400.
49347 CALL 58806 Play music
RESET GAME DATA
49350 LD A,255
49352 LD (60340),A Decrementing timer before a warlock might appear in Maroc's room
49355 LD (60341),A Decrementing timer before a creature might wander into the room from an adjacent one
49358 LD A,128
49360 LD (60128),A Maroc's energy - maximum is 255 but he starts with half a full energy bar
49363 LD A,0
49365 LD (60572),A FREEZE spell timer (0 = FREEZE spell not active)
49368 LD (60577),A Maroc's height offset (his movement speed affects his height above his shadow)
49371 LD (60129),A Spell selection byte - start in spell menu, with no spell selected
49374 LD (60140),A Temp store for spell number pointer. Only the MOVE spell is available at the start of the game
49377 LD (60373),A Energy drain/heal amount for ongoing effect spells, e.g. SHIELD (drain) or CHALICE (heal)
49380 LD (60137),A Currently active 'effect' spell (e.g. UNSEEN, SHIELD)
49383 LD (60130),A Store for spell counter used in checking spells collected at 59070
49386 LD A,74 Maroc's vertical (Y-axis) screen position, in pixels, from top of play area just below border
49388 LD (60097),A
49391 LD A,71 Maroc's default colour attributes (71 = INK 7, PAPER 0, BRIGHT 1)
49393 LD (60071),A
49396 LD A,64 Maroc's vertical pixel starting position in the room
49398 LD (60276),A
49401 LD A,1
49403 LD (60084),A The connecting door set number in the table at 26512 (set 1)
49406 LD (60087),A Room number = 1
49409 LD HL,(60261) Memory address pointer for spell list data at 28156
49412 LD (60131),HL Copy to spell name pointer buffer
Prev: 49315 Up: Map Next: 49415