This will disable the mirror image altogether.Norbert wrote:I would like to disable the mirror reflection in the palace environment.
Is it important to keep it on dungeon levels?
Code: Select all
seg003:0798 ; int __pascal far check_mirror()
seg003:0798 check_mirror proc far ; CODE XREF: jump_mirror↓P
seg003:0798
seg003:0798 clip_top = word ptr -2
seg003:0798
seg003:0798 push bp
seg003:0799 mov bp, sp
seg003:079B sub sp, 2
seg003:079E cmp jumped_through_mirror, 0FFFFh
seg003:07A3 jnz loc_4F9B
seg003:07A5 push cs
seg003:07A6 call near ptr jump_through_mirror
seg003:07A9 jmp short loc_4FF6
seg003:07AB ; ───────────────────────────────────────────────────────────────────────────
seg003:07AB
seg003:07AB loc_4F9B: ; CODE XREF: check_mirror+B↑j
seg003:07AB call get_tile_at_char
seg003:07B0 cmp al, tiles_13_mirror
seg003:07B2 jnz loc_4FF6 ; <- here
seg003:07B4 call loadkid
seg003:07B9 call load_frame
seg003:07BE push cs
seg003:07BF call near ptr check_mirror_image
seg003:07C2 cmp byte_1E9FA, 0
seg003:07C7 jl loc_4FF6
seg003:07C9 call load_frame_to_obj ; from this line: mirror image
seg003:07CE call set_top_rect
seg003:07D3 mov al, char_curr_row
seg003:07D6 cbw
seg003:07D7 mov bx, ax
seg003:07D9 shl bx, 1
seg003:07DB mov ax, (y_clip+2)[bx]
seg003:07DF mov [bp+clip_top], ax
seg003:07E2 mov cl, obj_y
seg003:07E6 sub ch, ch
seg003:07E8 cmp ax, cx
seg003:07EA jnb loc_4FF6
seg003:07EC mov obj_clip_top, ax
seg003:07EF mov al, char_curr_col
seg003:07F2 cbw
seg003:07F3 mov cl, 5 ; 1<<5=32=width of a tile
seg003:07F5 shl ax, cl
seg003:07F7 add ax, 9 ; distance of mirror from left edge of tile
seg003:07FA mov obj_clip_left, ax
seg003:07FD mov ax, 4
seg003:0800 push ax
seg003:0801 call add_objtable
seg003:0806
seg003:0806 loc_4FF6: ; CODE XREF: check_mirror+11↑j
seg003:0806 ; check_mirror+1A↑j ...
seg003:0806 mov sp, bp
seg003:0808 pop bp
seg003:0809 retf
seg003:0809 check_mirror endp
Code: Select all
00005188:i55 push bp
00005189:i8BEC mov bp,sp
0000518B:i83EC02 sub (w) sp,+02
0000518E:i833EA042FF cmp (w) [+42A0],-01
00005193:i7506 jne file:0000519B
00005195:i0E push cs
00005196:iE86100 calln file:000051FA
00005199:iEB5B jmps file:000051F6
0000519B:i9A0D07CB06 callf file:000073BD
000051A0:i3C0D cmp al,0D
000051A2:i7552 jne file:000051F6 ; <- here
000051A4:i9A4F04CB06 callf file:000070FF
000051A9:i9A5A01CB06 callf file:00006E0A
000051AE:i0E push cs
000051AF:iE89900 calln file:0000524B
000051B2:i803E1A3D00 cmp [+3D1A],00
000051B7:i7C3D jl file:000051F6
000051B9:i9A4824C209 callf file:0000C068
000051BE:i9A0705CB06 callf file:000071B7
000051C3:iA0273D mov al,[+3D27]
000051C6:i98 cbw
000051C7:i8BD8 mov bx,ax
000051C9:iD1E3 shl (w) bx,1
000051CB:i8B879422 mov ax,[bx+2294]
000051CF:i8946FE mov [bp-02],ax
000051D2:i8A0E1346 mov cl,[+4613]
000051D6:i2AED sub ch,ch
000051D8:i3BC1 cmp ax,cx
000051DA:i731A jnc file:000051F6
000051DC:iA3C642 mov [+42C6],ax
000051DF:iA0263D mov al,[+3D26]
000051E2:i98 cbw
000051E3:iB105 mov cl,05
000051E5:iD3E0 shl (w) ax,cl
000051E7:i050900 add ax,0009
000051EA:iA3A642 mov [+42A6],ax
000051ED:iB80400 mov ax,0004
000051F0:i50 push ax
000051F1:i9A8823C209 callf file:0000BFA8
000051F6:i8BE5 mov sp,bp
000051F8:i5D pop bp
000051F9:iCB retf