8D9F: Sets up and blits the flame, if required.
Bg_TorchBlitFlame |
8D9F |
LD A,(Camera_Compass) |
|
8DA2 |
CP (IX+$0A) |
|
8DA5 |
JR Z,Bg_TorchBlitFlame_1 |
Bg_TorchBlitFlame_0 |
8DA7 |
LD (IX+$02),$00 |
|
8DAB |
RET |
Bg_TorchBlitFlame_1 |
8DAC |
LD HL,(Coords_NS) |
|
8DAF |
BIT 0,A |
|
8DB1 |
JR NZ,Bg_TorchBlitFlame_2 |
|
8DB3 |
LD HL,(Coords_EW) |
Bg_TorchBlitFlame_2 |
8DB6 |
LD E,(IX+$05) |
|
8DB9 |
LD D,(IX+$06) |
|
8DBC |
BIT 1,A |
|
8DBE |
JR NZ,Bg_TorchBlitFlame_3 |
|
8DC0 |
EX DE,HL |
Bg_TorchBlitFlame_3 |
8DC1 |
AND A |
|
8DC2 |
SBC HL,DE |
|
8DC4 |
LD DE,$0021 |
|
8DC7 |
AND A |
|
8DC8 |
ADC HL,DE |
|
8DCA |
JR Z,Bg_TorchBlitFlame_0 |
|
8DCC |
JP M,Bg_TorchBlitFlame_0 |
|
8DCF |
LD DE,$0042 |
|
8DD2 |
AND A |
|
8DD3 |
SBC HL,DE |
|
8DD5 |
JR NC,Bg_TorchBlitFlame_0 |
|
8DD7 |
ADD HL,DE |
|
8DD8 |
SRL H |
|
8DDA |
RR L |
|
8DDC |
LD DE,Offscreen_Attr |
|
8DDF |
ADD HL,DE |
|
8DE0 |
LD A,(HL) |
|
8DE1 |
AND $F8 |
|
8DE3 |
OR $02 |
|
8DE5 |
LD (HL),A |
|
8DE6 |
INC HL |
|
8DE7 |
LD (HL),A |
|
8DE8 |
LD A,(CurrentRoom_Type) |
|
8DEB |
AND A |
|
8DEC |
JR NZ,Bg_TorchBlitFlame_5 |
|
8DEE |
LD A,(Flag_dayNight) |
|
8DF1 |
AND A |
|
8DF2 |
JR NZ,Bg_TorchBlitFlame_4 |
|
8DF4 |
LD A,(IX+$0B) |
|
8DF7 |
CP $15 |
|
8DF9 |
JR NZ,Bg_TorchBlitFlame_5 |
|
8DFB |
LD A,$A2 |
|
8DFD |
JR Bg_TorchBlitFlame_6 |
Bg_TorchBlitFlame_4 |
8DFF |
LD A,$15 |
|
8E01 |
JR Bg_TorchBlitFlame_6 |
Bg_TorchBlitFlame_5 |
8E03 |
LD A,(IX+$0B) |
|
8E06 |
XOR $01 |
Bg_TorchBlitFlame_6 |
8E08 |
LD (IX+$0B),A |
|
8E0B |
LD (IX+$09),$08 |
|
8E0F |
LD A,$01 |
|
8E11 |
JP ObjNode_BlitShft |