Prev: C3A5 Up: Map Next: C5EE
C3B3: Display information about the object at the current cursor position.
display_object_info C3B3 DI Disable interrupts and preserve registers.
C3B4 PUSH HL
C3B5 PUSH DE
C3B6 PUSH BC
C3B7 PUSH AF
C3B8 LD HL,(object_table_entry_pointer) If object at cursor position is blank, jump to display_object_info_2
C3BB LD A,(HL)
C3BC OR A
C3BD JP Z,display_object_info_2
C3C0 LD (object_number),A Else store code for current object in object_number.
C3C3 LD HL,object_info_flags If the current object is a wizard, set bit 1 of object_info_flags else clear it.
C3C6 RES 1,(HL)
C3C8 CP $29
C3CA JP M,not_wizard
C3CD SET 1,(HL)
not_wizard C3CF LD DE,$0281 Read corresponding entry in fifth_map_table.
C3D2 LD HL,(object_table_entry_pointer)
C3D5 ADD HL,DE
C3D6 LD A,(HL)
C3D7 OR A If not zero store in unknown70 and set bit 2 of object_info_flags. ???
C3D8 JR Z,display_object_info_0
C3DA LD (unknown70),A
C3DD LD HL,object_info_flags
C3E0 SET 2,(HL)
display_object_info_0 C3E2 CALL CLS Clear the screen and play sound_effect_23.
C3E5 LD HL,sound_effect_23
C3E8 CALL play_sound_effect_in_HL
C3EB LD A,$44 Set ATTR-T to bright green on black and draw border.
C3ED LD ($5C8F),A
C3F0 CALL ZRDR_P
C3F3 LD A,$60 Set ATTR-T to black on bright green and print press_any_key_string at coordinates (0,22).
C3F5 LD ($5C8F),A
C3F8 LD A,$3D
C3FA LD BC,$1600
C3FD CALL MPRINT
C400 LD A,$46 Set ATTR-T to bright yellow on black and print object's name at (4,2).
C402 LD ($5C8F),A
C405 LD BC,$0204
C408 LD A,(object_number)
C40B CALL MPRINT
C40E XOR A Clear display_comma_flag.
C40F LD (display_comma_flag),A
C412 LD HL,object_info_flags If bit 1 (wizard object) of object_info_flags is clear jump to not_wizard_2.
C415 BIT 1,(HL)
C417 JR Z,not_wizard_2
C419 LD BC,$0404 Set BC to coordinates (4,4).
C41C LD A,(object_number) Calculate wizard number as offset in unknown_table_3.
C41F SUB $29
C421 LD HL,unknown_table_3
C424 LD D,$00
C426 LD E,A
C427 ADD HL,DE
C428 LD A,(HL) Copy from table into unknown72.
C429 LD (unknown72),A
C42C BIT 1,A If bit 1 is set print knife_string spell property.
C42E JR Z,not_knife
C430 LD A,$3E
C432 CALL print_spell_property
not_knife C435 LD HL,unknown72 If bit 2 is set print sword_string spell property.
C438 BIT 2,(HL)
C43A JR Z,not_sword
C43C LD A,$3F
C43E CALL print_spell_property
not_sword C441 LD A,(unknown72) If bits 6 and 7 are set print armour_string spell property.
C444 AND $C0
C446 CP $C0
C448 JR NZ,not_armour
C44A LD A,$40
C44C CALL print_spell_property
not_armour C44F LD A,(unknown72) If bit 6 is set and bit 7 is clear print shield_string spell property.
C452 AND $C0
C454 CP $40
C456 JR NZ,not_shield
C458 LD A,$41
C45A CALL print_spell_property
not_shield C45D LD A,(unknown72) If bit 5 is set print flying_string spell property.
C460 BIT 5,A
C462 JR Z,not_flying
C464 LD A,$42
C466 CALL print_spell_property
not_flying C469 LD A,(unknown72) If bit 3 is set print shadow_string spell property.
C46C BIT 3,A
C46E JP Z,done_undead
C471 LD A,$43
C473 CALL print_spell_property
C476 JP done_undead Jump to done_undead.
not_wizard_2 C479 INC C Increment x coordinate.
C47A LD A,(object_number) Get CHAOS/LAW attribute of object.
C47D LD D,A
C47E LD E,$15
C480 CALL GETCHR
C483 OR A If zero jump to done_chaos_law.
C484 JR Z,done_chaos_law
C486 PUSH AF If negative jump to is_chaos.
C487 JP M,is_chaos
C48A LD A,$45 Set ATTR-T to bright cyan on black and print law_string.
C48C LD ($5C8F),A
C48F LD A,$47
C491 CALL MPRINT
C494 POP AF
C495 ADD A,$30 Print value and closing bracket.
C497 CALL DH_P
C49A LD A,$29
C49C CALL DH_P
C49F JR done_chaos_law Jump to done_chaos_law.
is_chaos C4A1 LD A,$43 Set ATTR-T to bright magenta on black and print chaos_string.
C4A3 LD ($5C8F),A
C4A6 LD A,$46
C4A8 CALL MPRINT
C4AB POP AF
C4AC NEG Convert value to positive number and print it followed by closing bracket.
C4AE ADD A,$30
C4B0 CALL DH_P
C4B3 LD A,$29
C4B5 CALL DH_P
done_chaos_law C4B8 LD A,$44 Set ATTR-T to bright green on black and set coordinates to (4,4).
C4BA LD ($5C8F),A
C4BD LD BC,$0404
C4C0 LD A,(object_number) If object number is between 16 and 21 print mount_string property.
C4C3 CP $10
C4C5 JP M,done_mount
C4C8 CP $16
C4CA JP P,done_mount
C4CD LD A,$44
C4CF CALL print_spell_property
done_mount C4D2 LD A,(unknown70) If unknown70 is not zero print wizard name in brackets. ???
C4D5 OR A
C4D6 JR Z,done_wizard_name
C4D8 PUSH AF
C4D9 LD A,$28
C4DB CALL DH_P
C4DE POP AF
C4DF CALL MPRINT
C4E2 LD A,$29
C4E4 CALL DH_P
C4E7 LD A,$01 Set display_comma_flag.
C4E9 LD (display_comma_flag),A
done_wizard_name C4EC LD A,(object_number) If object number is between 19 and 29 print flying_string property.
C4EF CP $13
C4F1 JP M,done_flying
C4F4 CP $1E
C4F6 JP P,done_flying
C4F9 LD A,$42
C4FB CALL print_spell_property
done_flying C4FE LD HL,(object_table_entry_pointer) If bit 6 of entry in map_object_properties_table is set or object number is between 28 and 33, print undead_string property.
C501 LD DE,$01E1
C504 ADD HL,DE
C505 BIT 6,(HL)
C507 JR NZ,is_undead
C509 LD A,(object_number)
C50C CP $1C
C50E JP M,done_undead
C511 CP $22
C513 JP P,done_undead
is_undead C516 LD A,$45
C518 CALL print_spell_property
done_undead C51B LD A,$45 Set ATTR-T to bright cyan on black.
C51D LD ($5C8F),A
C520 LD A,$48 Set creature_attribute_message to combat_string.
C522 LD (creature_attribute_message),A
C525 LD A,$0D Set offset_in_object_data to combat attribute.
C527 LD (offset_in_object_data),A
C52A LD HL,creature_attr_coords_table Set HL to address of first coordinate in creature_attr_coords_table.
C52D LD B,$07 Set B to seven as loop counter.
display_next_attribute C52F PUSH BC
C530 LD C,(HL) Load coordinates into BC and move on to next word in table.
C531 INC HL
C532 LD B,(HL)
C533 INC HL
C534 PUSH HL Print the next attribute.
C535 CALL print_creature_attribute
C538 POP HL
C539 POP BC Restore counter and loop for seven iterations.
C53A DJNZ display_next_attribute
C53C LD A,(object_info_flags) If bit 0 ??? of object_info_flags is clear then jump to done_casting_chance.
C53F BIT 0,A
C541 JR Z,done_casting_chance
C543 LD A,$45 Set ATTR-T to bright cyan on black.
C545 LD ($5C8F),A
C548 LD A,$4F Print casting_chance_string at coordinates (4,18).
C54A LD BC,$1204
C54D CALL MPRINT
C550 LD A,(temp_casting_chance) If temp_casting_chance + 1 equals 10 print ten_string.
C553 INC A
C554 CP $0A
C556 JR NZ,print_casting_chance
C558 LD A,$50
C55A CALL MPRINT
C55D JR print_0_percent
print_casting_chance C55F ADD A,$30 Else print value.
C561 CALL DH_P
print_0_percent C564 LD A,$30 Print "0%".
C566 CALL DH_P
C569 LD A,$25
C56B CALL DH_P
done_casting_chance C56E LD A,(object_info_flags) If bit 1 (wizard object) of object_info_flags is clear then jump to not_wizard_3.
C571 BIT 1,A
C573 JR Z,not_wizard_3
C575 LD A,$46 Set ATTR-T to bright yellow on black.
C577 LD ($5C8F),A
C57A LD A,$51 Print spells_string at coordinates (4,18).
C57C LD BC,$1204
C57F CALL MPRINT
C582 LD A,(object_number) Get number of spells attribute from wizard object.
C585 LD D,A
C586 LD E,$14
C588 CALL GETCHR
C58B CP $0A If less than 10 jump to spell_units.
C58D JP M,spell_units
C590 CP $14 If not 20 jump to ten_to_nineteen.
C592 JR NZ,ten_to_nineteen
C594 LD A,$32 Print '2' and jump to spell_units.
C596 CALL DH_P
C599 LD A,$00
C59B JR spell_units
ten_to_nineteen C59D SUB $0A Subtract 10 from value and print '1'.
C59F PUSH AF
C5A0 LD A,$31
C5A2 CALL DH_P
C5A5 POP AF
spell_units C5A6 ADD A,$30 Print value.
C5A8 CALL DH_P
C5AB LD BC,$120E Print ability_string at coordinates (14,18).
C5AE LD A,$52
C5B0 CALL MPRINT
C5B3 LD A,(object_number) Get ability attribute from wizard object.
C5B6 LD D,A
C5B7 LD E,$15
C5B9 CALL GETCHR
C5BC ADD A,$30 Print value.
C5BE CALL DH_P
not_wizard_3 C5C1 LD A,(unknown70) If unknown70 is zero jump to display_object_info_1. ???
C5C4 OR A
C5C5 JR Z,display_object_info_1
C5C7 LD HL,object_info_flags Clear bit 1 (wizard object) of object_info_flags.
C5CA RES 1,(HL)
C5CC LD (object_number),A Copy unknown70 to object_number.
C5CF XOR A Set unknown70 to zero.
C5D0 LD (unknown70),A
C5D3 CALL wait_no_key_seed Wait for a keypress from human players and jump back to display_object_info_0. ???
C5D6 CALL wait_key_seed
C5D9 JP display_object_info_0
display_object_info_1 C5DC CALL wait_no_key_seed Wait for a keypress from human players and clear screen.
C5DF CALL wait_key_seed
C5E2 CALL CLS
C5E5 CALL routine50 Call routine50. ???
display_object_info_2 C5E8 POP HL Restore registers, enable interrupts and return.
C5E9 POP DE
C5EA POP BC
C5EB POP AF
C5EC EI
C5ED RET
Prev: C3A5 Up: Map Next: C5EE