Prev: 33516 Up: Map Next: 33541
33525: Point HL to the E-th byte of the A-th record in object properties table
Used by the routines at 29488, 30145, 30968, 31537, 33487, 34484 and 34627.
Input
A Index of required record (i.e. table entry number), first is zero
E Index of required field within record (i.e. byte number), first is zero
HL (entry at 33528 only) Points to table of characters' current stats (Gordon's entry, i.e. not including Magic Knight)
Output
HL Points to required field within record of interest
33525 LD HL,37441 Point HL at start of table of object properties
This entry point is used by the routine at 33541.
33528 PUSH HL Store HL (points to current position in a table of 8-byte-wide records)
33529 ADD A,A Multiply A (record number) by eight and load into HL...
33530 ADD A,A ...
33531 LD L,A ...
33532 LD H,0 ...
33534 ADD HL,HL ...
33535 LD D,0 Set D to zero (DE = field number)
33537 ADD HL,DE Add field number to HL to give exact offset to record and field of interest
33538 POP DE Restore DE (points to current position in a table of 8-byte-wide records)...
33539 ADD HL,DE ...and add to offset value already in HL
33540 RET Return
Prev: 33516 Up: Map Next: 33541