Prev: 7F6E Up: Map Next: 811A
7F6F: Room : Initialise and redraw.
Input
Output
Room_Initialise 7F6F DI
7F70 LD A,$01
7F72 LD (_7f6e),A
7F75 CALL Block_ClearMem Clear door cache.
7F78 DEFW Door_cache
7F7A DEFB $18
Return address.
7F7B CALL Path_Find
7F7E CALL Bg_DrawAll
7F81 LD DE,(Hero_Frame)
7F85 LD A,(Flag_DoorEntry)
7F88 AND A
7F89 JR NZ,Room_Initialise_0
7F8B LD A,(Hero_CompassFacing)
7F8E LD HL,(Camera_Compass)
7F91 LD E,$12
7F93 CP L
7F94 JR Z,Room_Initialise_0
7F96 LD E,$13
7F98 ADD A,$02
7F9A AND $03
7F9C CP L
7F9D JR Z,Room_Initialise_0
7F9F LD E,$10
7FA1 LD A,(Hero_CompassFacing)
7FA4 SUB L
7FA5 AND $03
7FA7 LD (Hero_LastDirection),A
7FAA CP $03
7FAC JR NZ,Room_Initialise_0
7FAE LD A,$02
7FB0 LD (Hero_LastDirection),A
Room_Initialise_0 7FB3 LD D,$00
7FB5 LD (Hero_Frame),DE
7FB9 LD HL,$5800
7FBC LD DE,$5801
7FBF LD BC,$00BF
7FC2 LD A,(Msg_CountDown)
7FC5 AND A
7FC6 JR Z,Room_Initialise_1
7FC8 LD BC,$00A5
Room_Initialise_1 7FCB LD (HL),$00
7FCD LDIR
7FCF CALL Stage_AreaColour
7FD2 LD A,$02
7FD4 CALL $1601
7FD7 LD L,$D0 Draw vertical border ornament bitmap.
7FD9 LD BC,$00F8
7FDC LD A,$03
7FDE CALL Bmp_BlitAtCharPos
7FE1 LD L,$D1 Draw horizontal border ornament bitmap.
7FE3 LD BC,$0060
7FE6 LD A,$03
7FE8 CALL Bmp_BlitAtCharPos
7FEB LD L,$C9 Draw compass ornament bitmap.
7FED LD BC,$0000
7FF0 LD A,$05
7FF2 CALL Bmp_BlitAtCharPos
Draw compass.
7FF5 LD HL,(Camera_Compass)
7FF8 LD H,$00
7FFA LD DE,Msg_nesw
7FFD ADD HL,DE
7FFE LD DE,Msg_CompassPos
8001 LD C,$04
8003 LD B,$07
Room_Initialise_2 8005 LD A,(DE)
8006 CALL Print_SelectChar
8009 INC DE
800A DJNZ Room_Initialise_2
800C LD A,(HL)
800D CALL Print_SelectChar
8010 INC HL
8011 LD B,$03
8013 DEC C
8014 JR NZ,Room_Initialise_2
Display room specific messages.
8016 CALL Print_StrFromStack
8019 DEFB $16
801A DEFB $01
801B DEFB $06
801C DEFB $10
801D DEFB $06
801E DEFB $11
801F DEFB $00
8020 DEFB $13
8021 DEFB $01
8022 DEFB $5E
8023 LD A,(CurrentRoom_Type)
8026 CP $01
8028 JR NZ,Room_Initialise_3
Seller
802A CALL Print_StrFromStack
802D DEFM "we sell:"
8035 DEFB $16
8036 DEFB $02
8037 DEFB $06
8038 LD E,(HL)
8039 JR Room_Initialise_4
Room_Initialise_3 803B CP $02
803D JP NZ,Room_Initialise_6
Broker
8040 CALL Print_StrFromStack
8043 DEFM "we buy:"
804A DEFB $16
804B DEFB $02
804C DEFB $06
804D DEFB $5E
804E LD IX,(Room_CurrentDataPtr) Print word at end of message.
8052 LD A,(IX+$06)
8055 CALL Dict_Print
8058 JR Room_Initialise_5
Room_Initialise_4 805A CALL Print_StrFromStack
805D DEFB $16 PRINT AT 2,6;
805E DEFB $02
805F DEFB $06
8060 DEFB $5E
8061 LD A,(Shop_ObjIndex)
8064 CALL Object_GetNounAddr
8067 CALL Print_String
Room_Initialise_5 806A CALL Print_StrFromStack
806D DEFM "s for "
8073 DEFB $5E
8074 LD HL,Obj_Price
8077 CALL Display_DecimalValue.
807A CALL Print_StrFromStack
807D DEFM "ir"
807F LD E,(HL)
8080 JP Room_Initialise_11
Str_Deposit 8083 DEFM "deposit fee 50ir"
8094 DEFB $5E
Room_Initialise_6 8095 CP $03
8097 JP NZ,Room_Initialise_7
Deposit
809A LD HL,Str_Deposit
809D JR Room_Initialise_8
Room_Initialise_7 809F CP $08
80A1 JR NZ,Room_Initialise_9
Castle
80A3 LD IX,(Room_CurrentDataPtr)
80A7 LD L,(IX+$03)
80AA LD H,(IX+$04)
Room_Initialise_8 80AD CALL Object_StringExtraDisplay
80B0 JR Room_Initialise_11
Str_DepositRate 80B2 DEFM "min.deposit 1000+bank rate 1% per day"
80D7 DEFB $5E
Room_Initialise_9 80D8 CP $09
80DA JR NZ,Room_Initialise_10
Bank
80DC LD HL,Str_DepositRate
80DF JR Room_Initialise_8
Str_PortationFee 80E1 DEFM "portation fee: 200"
80F3 DEFB $5E
Room_Initialise_10 80F4 CP $0A
80F6 JR NZ,Room_Initialise_11
Portal
80F8 CALL Area_HideName
80FB LD HL,$0000
80FE LD (_AreaNamePtr),HL
8101 LD HL,Str_PortationFee
8104 JR Room_Initialise_8
Room_Initialise_11 8106 LD A,(Flag_DoorEntry)
8109 AND A
810A JR Z,Room_Initialise_12
810C CALL Stage_Draw
810F JR Room_Initialise_13
Room_Initialise_12 8111 LD A,(Hero_Frame)
8114 CALL Stage_Draw_0
Room_Initialise_13 8117 JP Offscreen_Blit
Prev: 7F6E Up: Map Next: 811A