Prev: 53814 Up: Map Next: 53887
53825: Copy room dimension data entry for current character / entity's current room to temporary store location
Temporary store location is 34230.
Used by the routines at 34916 and 53887.
Input
IX (Entry at 53848 only) Address of complex state data for an entity
53825 LD A,(34208) If Drutt-mode flag is reset (Berk mode)...
53828 BIT 0,A ...
53830 JR Z,53838 ...then skip ahead to 53838
53832 LD IX,(34242) Load IX with address of current level's complex state data for Drutt
53836 JR 53842 Skip ahead to 53842
53838 LD IX,(34240) Load IX with address of current level's complex state data for Berk
53842 LD A,(IX+0) Store current character's current room at 34218...
53845 LD (34218),A ...
This entry point is used by the routines at 35689, 37062, 39278, 51739, 52837, 53083, 54480 and 55525.
53848 LD A,(IX+0) Load entity's current room into A
53851 DEC A Subtract 1...
53852 LD E,A ...and multiply by 5...
53853 ADD A,A ...
53854 ADD A,A ...
53855 ADD A,E ...
53856 LD C,A Load into BC...
53857 LD B,0 ...
53859 LD HL,(34248) Load start address of current level's room dimension data into HL...
53862 ADD HL,BC ...and add BC as offset
53863 LD (34262),HL Store HL at 34262
53866 LD C,5 Set BC to 5 (as entries are 5 bytes wide)
53868 LD DE,34230 Copy data entry in room dimension data for entity's current room to 34230...
53871 LDIR ...
53873 LD A,(34231) Load position (chars) of left side of current room into E...
53876 LD E,A ...
53877 LD A,(34232) Subtract position (chars) of right side of current room in A...
53880 SUB E ...
53881 ADD A,100 ...and add 100
53883 LD (34235),A Store value (width of current room + 99) at 34235
53886 RET Return
Prev: 53814 Up: Map Next: 53887