Prev: 6FE1 Up: Map Next: 7112
6FF2: Where the charms lie
32 records of 9 bytes, each a place where a charm lies. In the game as loaded only bytes 1 to 4 are filled: x, y, z and room number. init_special_objects fills in the rest when a game starts. Byte 0 becomes the charm's type, $60 to $67, taken in turn, so the eight kinds go round the table in a fixed order and each lies in exactly four places; only the starting kind varies, from the seed at $5BA0 plus the refresh register. Bytes 5 to 8 get a copy of bytes 1 to 4, and from then on they, not 1 to 4, say where the charm is now: x, y, z and room.
On entering a room, find_special_objs_here makes an object record, from $5C48 upwards, for every entry whose type is not 0 and whose byte 8 is this room. It gives the object a size of 5 by 5 by 12 and flags $14, and stores the address of the entry itself at +16 and +17 of the record, so the object can find its entry again. On leaving, update_special_objs writes the object's type and position back into bytes 0 and 5 to 8, which is how a charm that has been carried and dropped stays where it was put. Picking a charm up, feeding it to the cauldron or losing it writes 0 to byte 0, which takes that entry out of the game (pickup_object, add_obj_to_cauldron, upd_185_187).
This table only says where the charms lie. Which of them the wizard wants, and in what order, is the separate list at objects_required, which shuffle_objects_required rotates at the start of a game.
No room holds more than one entry, so the two object slots from $5C48 to $5C87 are always enough. The 32 rooms are all different, and all exist in location_tbl.
special_objs_tbl 6FF2 DEFB $00,$88,$80,$A4,$6D,$00,$00,$00 Place 0: room $6D, x $88, y $80, z $A4
6FFA DEFB $00
6FFB DEFB $00,$80,$80,$8C,$27,$00,$00,$00 Place 1: room $27, x $80, y $80, z $8C
7003 DEFB $00
7004 DEFB $00,$88,$78,$B0,$D0,$00,$00,$00 Place 2: room $D0, x $88, y $78, z $B0
700C DEFB $00
700D DEFB $00,$78,$88,$80,$0A,$00,$00,$00 Place 3: room $0A, x $78, y $88, z $80
7015 DEFB $00
7016 DEFB $00,$78,$88,$80,$BA,$00,$00,$00 Place 4: room $BA, x $78, y $88, z $80
701E DEFB $00
701F DEFB $00,$88,$78,$B0,$42,$00,$00,$00 Place 5: room $42, x $88, y $78, z $B0
7027 DEFB $00
7028 DEFB $00,$88,$B8,$BC,$8D,$00,$00,$00 Place 6: room $8D, x $88, y $B8, z $BC
7030 DEFB $00
7031 DEFB $00,$A8,$A8,$80,$FF,$00,$00,$00 Place 7: room $FF, x $A8, y $A8, z $80
7039 DEFB $00
703A DEFB $00,$80,$80,$80,$87,$00,$00,$00 Place 8: room $87, x $80, y $80, z $80
7042 DEFB $00
7043 DEFB $00,$78,$B8,$80,$F3,$00,$00,$00 Place 9: room $F3, x $78, y $B8, z $80
704B DEFB $00
704C DEFB $00,$A8,$68,$B0,$A8,$00,$00,$00 Place 10: room $A8, x $A8, y $68, z $B0
7054 DEFB $00
7055 DEFB $00,$B8,$48,$B0,$D2,$00,$00,$00 Place 11: room $D2, x $B8, y $48, z $B0
705D DEFB $00
705E DEFB $00,$48,$48,$80,$00,$00,$00,$00 Place 12: room $00, x $48, y $48, z $80
7066 DEFB $00
7067 DEFB $00,$88,$B8,$80,$22,$00,$00,$00 Place 13: room $22, x $88, y $B8, z $80
706F DEFB $00
7070 DEFB $00,$B8,$B8,$B0,$7A,$00,$00,$00 Place 14: room $7A, x $B8, y $B8, z $B0
7078 DEFB $00
7079 DEFB $00,$B8,$B8,$80,$F9,$00,$00,$00 Place 15: room $F9, x $B8, y $B8, z $80
7081 DEFB $00
7082 DEFB $00,$88,$98,$B0,$D6,$00,$00,$00 Place 16: room $D6, x $88, y $98, z $B0
708A DEFB $00
708B DEFB $00,$78,$88,$B0,$E8,$00,$00,$00 Place 17: room $E8, x $78, y $88, z $B0
7093 DEFB $00
7094 DEFB $00,$78,$78,$B0,$F6,$00,$00,$00 Place 18: room $F6, x $78, y $78, z $B0
709C DEFB $00
709D DEFB $00,$88,$78,$8C,$0F,$00,$00,$00 Place 19: room $0F, x $88, y $78, z $8C
70A5 DEFB $00
70A6 DEFB $00,$B8,$B8,$80,$6F,$00,$00,$00 Place 20: room $6F, x $B8, y $B8, z $80
70AE DEFB $00
70AF DEFB $00,$48,$B8,$A4,$FD,$00,$00,$00 Place 21: room $FD, x $48, y $B8, z $A4
70B7 DEFB $00
70B8 DEFB $00,$78,$78,$B0,$08,$00,$00,$00 Place 22: room $08, x $78, y $78, z $B0
70C0 DEFB $00
70C1 DEFB $00,$88,$88,$A4,$BB,$00,$00,$00 Place 23: room $BB, x $88, y $88, z $A4
70C9 DEFB $00
70CA DEFB $00,$78,$78,$B0,$DF,$00,$00,$00 Place 24: room $DF, x $78, y $78, z $B0
70D2 DEFB $00
70D3 DEFB $00,$80,$80,$80,$5E,$00,$00,$00 Place 25: room $5E, x $80, y $80, z $80
70DB DEFB $00
70DC DEFB $00,$78,$88,$B0,$B4,$00,$00,$00 Place 26: room $B4, x $78, y $88, z $B0
70E4 DEFB $00
70E5 DEFB $00,$78,$78,$B0,$04,$00,$00,$00 Place 27: room $04, x $78, y $78, z $B0
70ED DEFB $00
70EE DEFB $00,$48,$B8,$80,$74,$00,$00,$00 Place 28: room $74, x $48, y $B8, z $80
70F6 DEFB $00
70F7 DEFB $00,$80,$80,$80,$40,$00,$00,$00 Place 29: room $40, x $80, y $80, z $80
70FF DEFB $00
7100 DEFB $00,$68,$78,$B0,$38,$00,$00,$00 Place 30: room $38, x $68, y $78, z $B0
7108 DEFB $00
7109 DEFB $00,$48,$B8,$98,$F0,$00,$00,$00 Place 31: room $F0, x $48, y $B8, z $98
7111 DEFB $00
Prev: 6FE1 Up: Map Next: 7112