Prev: 27973 Up: Map Next: 28029
28007: Create Introduction Actor
Used by the routines at StartLevelIntroduction and StartCharlieRunning.
Creates an actor for the level introduction, at the right of the screen (horizontal co-ordinate 240 vertical co-ordinate 104). Bytes 5 and 6 of the actor are cleared.
Input
C ID of the actor
DE Address of the sprite ID and the colour
HL Address of the actor
CreateIntroductionActor 28007 LD (HL),C Write the ID to the actor.
28008 INC HL Move on to the horizontal co-ordinate.
28009 LD (HL),240 Set the horizontal co-ordinate to 240 (off the right of the screen).
28011 INC HL Move on to the vertical co-ordinate.
28012 LD (HL),104 Write 104 to the vertical co-ordinate.
28014 INC HL Move on to the colour.
28015 LD A,(DE) Fetch the sprite ID.
28016 LD C,A Keep the sprite ID in C.
28017 INC DE Move on to the colour in the data.
28018 LD A,(DE) Fetch the colour.
28019 LD (HL),A Update the actor colour.
28020 INC HL Move on to byte 4 of the actor.
28021 LD (HL),C Write the sprite ID to byte 4 of the actor.
28022 INC HL Move on to byte 5 of the actor.
28023 LD (HL),0 Write 0 to byte 5 of the actor.
28025 INC HL Move on to byte 6 of the actor.
28026 LD (HL),0 Write 0 to byte 6 of the actor.
28028 RET Return.
Prev: 27973 Up: Map Next: 28029