Prev: AC66 Up: Map Next: ACC0
AC93: Creates a new node, copies the content of 'TempStore' into it and adds to Bg Link List.
Used by the routines at Event_CreateDoor, Bg_TorchAdd and Actor_CreateDoorEvent.
Input
TempStore Holds data to be copied into new list.
EXIT IX = address of new node.
Output
Returns with Z set if no more nodes.
LinkList_CreateNewBg AC93 LD A,($B12C) If high byte of link list ptr is zero, then ignore.
AC96 AND A
AC97 RET Z
AC98 LD IX,(LinkList_Spare_Ptr) Get address of first spare node.
AC9C LD DE,(LinkList_Spare_Ptr)
ACA0 LD L,(IX+$00) Detach from list
ACA3 LD H,(IX+$01)
ACA6 LD (LinkList_Spare_Ptr),HL
ACA9 LD HL,TempStore Copy required data into new node.
ACAC LD BC,$000F
ACAF LDIR
ACB1 OR H
ACB2 LD HL,(LinkList_Bg_Ptr) Add node to background link list.
ACB5 LD (IX+$00),L
ACB8 LD (IX+$01),H
ACBB LD (LinkList_Bg_Ptr),IX
ACBF RET
Prev: AC66 Up: Map Next: ACC0