Skip to content

Instantly share code, notes, and snippets.

@Dwedit
Created March 26, 2019 12:39
Show Gist options
  • Save Dwedit/bd39c75a1ad22b4527aec80a38f1cf39 to your computer and use it in GitHub Desktop.
Save Dwedit/bd39c75a1ad22b4527aec80a38f1cf39 to your computer and use it in GitHub Desktop.
Snes9x DrawTile16AddS1_2_Normal1x1 disassembly
?DrawTile16AddS1_2_Normal1x1@@YAXIIII@Z PROC ; DrawTile16AddS1_2_Normal1x1, COMDAT
; 104981: {
mov QWORD PTR [rsp+16], rbx
mov QWORD PTR [rsp+24], rbp
mov QWORD PTR [rsp+32], rsi
push r12
push r14
push r15
sub rsp, 32 ; 00000020H
mov r15d, r8d
mov ebp, ecx
; 104982:
; 104983: uint8 *pCache;
; 104984: int32 l;
; 104985: uint8 *bp, Pix;
; 104986: uint32 TileNumber;
; 104987: uint32 TileAddr = BG.TileAddress + ((Tile & 0x3ff) << BG.TileShift);
mov r8d, ecx
mov r12d, r9d
mov ecx, DWORD PTR ?BG@@3USBG@@A+32
and r8d, 1023 ; 000003ffH
mov eax, r8d
mov ebx, edx
shl eax, cl
add eax, DWORD PTR ?BG@@3USBG@@A+36
; 104988: if (Tile & 0x100) TileAddr += BG.NameSelect;
bt ebp, 8
jae SHORT $LN14@DrawTile16
add eax, DWORD PTR ?BG@@3USBG@@A+40
$LN14@DrawTile16:
; 104989: TileAddr &= 0xffff;
movzx edx, ax
; 104990: TileNumber = TileAddr >> BG.TileShift;
; 104991: if (Tile & 0x4000) {
mov r14d, ebp
mov eax, edx
mov QWORD PTR [rsp+64], rdi
shr eax, cl
mov ecx, eax
mov esi, eax
shl ecx, 6
and r14d, 16384 ; 00004000H
je SHORT $LN15@DrawTile16
; 104992: pCache = &BG.BufferFlip[TileNumber << 6];
; 104993: if (!BG.BufferedFlip[TileNumber]) BG.BufferedFlip[TileNumber] = BG.ConvertTileFlip(pCache, TileAddr, Tile & 0x3ff);
mov rax, QWORD PTR ?BG@@3USBG@@A+88
mov rdi, QWORD PTR ?BG@@3USBG@@A+72
add rdi, rcx
cmp BYTE PTR [rsi+rax], 0
jne SHORT $LN61@DrawTile16
mov rcx, rdi
call QWORD PTR ?BG@@3USBG@@A+8
mov rcx, QWORD PTR ?BG@@3USBG@@A+88
mov BYTE PTR [rsi+rcx], al
mov rax, QWORD PTR ?BG@@3USBG@@A+88
; 104998: };
; 104999: if ((((Tile & 0x4000) ? BG.BufferedFlip[TileNumber] : BG.Buffered[TileNumber]) == 2)) return;
jmp SHORT $LN61@DrawTile16
$LN15@DrawTile16:
; 104994: }
; 104995: else {
; 104996: pCache = &BG.Buffer[TileNumber << 6];
; 104997: if (!BG.Buffered[TileNumber]) BG.Buffered[TileNumber] = BG.ConvertTile(pCache, TileAddr, Tile & 0x3ff);
mov rax, QWORD PTR ?BG@@3USBG@@A+80
mov rdi, QWORD PTR ?BG@@3USBG@@A+64
add rdi, rcx
cmp BYTE PTR [rsi+rax], 0
jne SHORT $LN61@DrawTile16
mov rcx, rdi
call QWORD PTR ?BG@@3USBG@@A
mov rcx, QWORD PTR ?BG@@3USBG@@A+80
mov BYTE PTR [rsi+rcx], al
mov rax, QWORD PTR ?BG@@3USBG@@A+80
$LN61@DrawTile16:
; 104998: };
; 104999: if ((((Tile & 0x4000) ? BG.BufferedFlip[TileNumber] : BG.Buffered[TileNumber]) == 2)) return;
cmp BYTE PTR [rsi+rax], 2
lea rcx, QWORD PTR [rsi+rax]
je $LN12@DrawTile16
; 105000: if (BG.DirectColourMode) {
cmp BYTE PTR ?BG@@3USBG@@A+96, 0
lea rsi, OFFSET FLAT:__ImageBase
je SHORT $LN20@DrawTile16
; 105001: GFX.RealScreenColors = DirectColourMaps[(Tile >> 10) & 7];
mov r9d, ebp
lea rax, OFFSET FLAT:?DirectColourMaps@@3PAY0BAA@GA ; DirectColourMaps
shr r9, 10
and r9d, 7
shl r9, 9
add r9, rax
jmp SHORT $LN399@DrawTile16
$LN20@DrawTile16:
; 105002: }
; 105003: else GFX.RealScreenColors = &IPPU.ScreenColors[((Tile >> BG.PaletteShift) & BG.PaletteMask) + BG.StartPalette];
mov ecx, DWORD PTR ?BG@@3USBG@@A+52
lea r9, QWORD PTR ?IPPU@@3UInternalPPU@@A[rsi+3600]
mov eax, ebp
shr eax, cl
and eax, DWORD PTR ?BG@@3USBG@@A+56
add eax, DWORD PTR ?BG@@3USBG@@A+48
lea r9, QWORD PTR [r9+rax*2]
$LN399@DrawTile16:
; 105004: GFX.ScreenColors = GFX.ClipColors ? BlackColourMap : GFX.RealScreenColors;
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
lea rax, OFFSET FLAT:?BlackColourMap@@3PAGA ; BlackColourMap
test dl, dl
mov QWORD PTR ?GFX@@3USGFX@@A+88, r9
cmovne r9, rax
mov QWORD PTR ?GFX@@3USGFX@@A+80, r9
; 105005: if (!(Tile & (0x8000 | 0x4000))) {
test ebp, 49152 ; 0000c000H
jne $LN22@DrawTile16
; 105006: bp = pCache + StartLine;
lea r11, QWORD PTR [r15+rdi]
; 105007: ;
; 105008: for (l = LineCount;
; 105009: l > 0;
test r12d, r12d
jle $LN12@DrawTile16
npad 14
$LL4@DrawTile16:
; 105011: if (GFX.Z1 > GFX.DB[Offset + 0] && (Pix = bp[0])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
mov r10d, ebx
movzx ecx, BYTE PTR [rax+r10]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN24@DrawTile16
movzx ecx, BYTE PTR [r11]
test cl, cl
je $LN24@DrawTile16
; 105012: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN67@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [rax+r10], 32 ; 00000020H
je SHORT $LN63@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
jmp SHORT $LN64@DrawTile16
$LN63@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN64@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105012: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN400@DrawTile16
$LN67@DrawTile16:
movzx eax, cl
lea r8, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [rax+r10], 32 ; 00000020H
je SHORT $LN65@DrawTile16
movzx edx, WORD PTR [r9+r8]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN66@DrawTile16
$LN65@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR [r9+r8]
movzx edx, WORD PTR ?GFX@@3USGFX@@A+100
mov ecx, r8d
shr ecx, 6
mov eax, edx
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN400@DrawTile16:
; 105012: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN66@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105013: GFX.DB[Offset + 0] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [rcx+r10], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN24@DrawTile16:
; 105014: };
; 105015: if (GFX.Z1 > GFX.DB[Offset + 1] && (Pix = bp[1])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+1]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN25@DrawTile16
movzx ecx, BYTE PTR [r11+1]
test cl, cl
je $LN25@DrawTile16
; 105016: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN73@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN69@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
jmp SHORT $LN70@DrawTile16
$LN69@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN70@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105016: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN401@DrawTile16
$LN73@DrawTile16:
movzx eax, cl
lea r8, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN71@DrawTile16
movzx edx, WORD PTR [r9+r8]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN72@DrawTile16
$LN71@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR [r9+r8]
movzx edx, WORD PTR ?GFX@@3USGFX@@A+100
mov ecx, r8d
shr ecx, 6
mov eax, edx
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN401@DrawTile16:
; 105016: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN72@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105017: GFX.DB[Offset + 1] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN25@DrawTile16:
; 105018: };
; 105019: if (GFX.Z1 > GFX.DB[Offset + 2] && (Pix = bp[2])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+2]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN26@DrawTile16
movzx ecx, BYTE PTR [r11+2]
test cl, cl
je $LN26@DrawTile16
; 105020: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN79@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN75@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
jmp SHORT $LN76@DrawTile16
$LN75@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN76@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105020: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN402@DrawTile16
$LN79@DrawTile16:
movzx eax, cl
lea r8, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN77@DrawTile16
movzx edx, WORD PTR [r9+r8]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN78@DrawTile16
$LN77@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR [r9+r8]
movzx edx, WORD PTR ?GFX@@3USGFX@@A+100
mov ecx, r8d
shr ecx, 6
mov eax, edx
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN402@DrawTile16:
; 105020: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN78@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105021: GFX.DB[Offset + 2] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN26@DrawTile16:
; 105022: };
; 105023: if (GFX.Z1 > GFX.DB[Offset + 3] && (Pix = bp[3])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+3]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN27@DrawTile16
movzx ecx, BYTE PTR [r11+3]
test cl, cl
je $LN27@DrawTile16
; 105024: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN85@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN81@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
jmp SHORT $LN82@DrawTile16
$LN81@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN82@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105024: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN403@DrawTile16
$LN85@DrawTile16:
movzx eax, cl
lea r8, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN83@DrawTile16
movzx edx, WORD PTR [r9+r8]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN84@DrawTile16
$LN83@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR [r9+r8]
movzx edx, WORD PTR ?GFX@@3USGFX@@A+100
mov ecx, r8d
shr ecx, 6
mov eax, edx
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN403@DrawTile16:
; 105024: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN84@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105025: GFX.DB[Offset + 3] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN27@DrawTile16:
; 105026: };
; 105027: if (GFX.Z1 > GFX.DB[Offset + 4] && (Pix = bp[4])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+4]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN28@DrawTile16
movzx ecx, BYTE PTR [r11+4]
test cl, cl
je $LN28@DrawTile16
; 105028: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN91@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN87@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105028: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN404@DrawTile16
$LN87@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105028: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN404@DrawTile16
$LN91@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN89@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN90@DrawTile16
$LN89@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN404@DrawTile16:
; 105028: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN90@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105029: GFX.DB[Offset + 4] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN28@DrawTile16:
; 105030: };
; 105031: if (GFX.Z1 > GFX.DB[Offset + 5] && (Pix = bp[5])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+5]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN29@DrawTile16
movzx ecx, BYTE PTR [r11+5]
test cl, cl
je $LN29@DrawTile16
; 105032: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN97@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN93@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105032: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN405@DrawTile16
$LN93@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105032: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN405@DrawTile16
$LN97@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN95@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN96@DrawTile16
$LN95@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN405@DrawTile16:
; 105032: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN96@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105033: GFX.DB[Offset + 5] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN29@DrawTile16:
; 105034: };
; 105035: if (GFX.Z1 > GFX.DB[Offset + 6] && (Pix = bp[6])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+6]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN30@DrawTile16
movzx ecx, BYTE PTR [r11+6]
test cl, cl
je $LN30@DrawTile16
; 105036: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN103@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN99@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105036: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN406@DrawTile16
$LN99@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105036: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN406@DrawTile16
$LN103@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN101@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN102@DrawTile16
$LN101@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN406@DrawTile16:
; 105036: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN102@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105037: GFX.DB[Offset + 6] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN30@DrawTile16:
; 105038: };
; 105039: if (GFX.Z1 > GFX.DB[Offset + 7] && (Pix = bp[7])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+7]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN2@DrawTile16
movzx ecx, BYTE PTR [r11+7]
test cl, cl
je $LN2@DrawTile16
; 105040: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN109@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN105@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105040: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN407@DrawTile16
$LN105@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105040: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN407@DrawTile16
$LN109@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN107@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN108@DrawTile16
$LN107@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN407@DrawTile16:
; 105040: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN108@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105041: GFX.DB[Offset + 7] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN2@DrawTile16:
; 105010: l--, bp += 8 * 1, Offset += GFX.PPL) {
add ebx, DWORD PTR ?GFX@@3USGFX@@A+68
dec r12d
add r11, 8
test r12d, r12d
jg $LL4@DrawTile16
; 105042: };
; 105043: }
; 105044: }
; 105045: else if (!(Tile & 0x8000)) {
jmp $LN12@DrawTile16
$LN22@DrawTile16:
bt ebp, 15
jb $LN32@DrawTile16
; 105046: bp = pCache + StartLine;
lea r11, QWORD PTR [r15+rdi]
; 105047: ;
; 105048: for (l = LineCount;
; 105049: l > 0;
test r12d, r12d
jle $LN12@DrawTile16
npad 8
$LL7@DrawTile16:
; 105051: if (GFX.Z1 > GFX.DB[Offset + 0] && (Pix = bp[7])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
mov r10d, ebx
movzx ecx, BYTE PTR [rax+r10]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN34@DrawTile16
movzx ecx, BYTE PTR [r11+7]
test cl, cl
je $LN34@DrawTile16
; 105052: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN115@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [rax+r10], 32 ; 00000020H
je SHORT $LN111@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105052: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN408@DrawTile16
$LN111@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105052: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN408@DrawTile16
$LN115@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [rax+r10], 32 ; 00000020H
je SHORT $LN113@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN114@DrawTile16
$LN113@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN408@DrawTile16:
; 105052: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN114@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105053: GFX.DB[Offset + 0] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [rcx+r10], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN34@DrawTile16:
; 105054: };
; 105055: if (GFX.Z1 > GFX.DB[Offset + 1] && (Pix = bp[6])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+1]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN35@DrawTile16
movzx ecx, BYTE PTR [r11+6]
test cl, cl
je $LN35@DrawTile16
; 105056: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN121@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN117@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105056: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN409@DrawTile16
$LN117@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105056: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN409@DrawTile16
$LN121@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN119@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN120@DrawTile16
$LN119@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN409@DrawTile16:
; 105056: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN120@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105057: GFX.DB[Offset + 1] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN35@DrawTile16:
; 105058: };
; 105059: if (GFX.Z1 > GFX.DB[Offset + 2] && (Pix = bp[5])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+2]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN36@DrawTile16
movzx ecx, BYTE PTR [r11+5]
test cl, cl
je $LN36@DrawTile16
; 105060: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN127@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN123@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx edx, dx
movzx r8d, WORD PTR [r9+rax*2]
; 105060: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN410@DrawTile16
$LN123@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx edx, dx
movzx r8d, WORD PTR [r9+rax*2]
; 105060: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN410@DrawTile16
$LN127@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN125@DrawTile16
movzx edx, WORD PTR [r9+rdx]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN126@DrawTile16
$LN125@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR [r9+rdx]
movzx edx, WORD PTR ?GFX@@3USGFX@@A+100
$LN410@DrawTile16:
; 105060: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN126@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105061: GFX.DB[Offset + 2] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN36@DrawTile16:
; 105062: };
; 105063: if (GFX.Z1 > GFX.DB[Offset + 3] && (Pix = bp[4])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+3]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN37@DrawTile16
movzx ecx, BYTE PTR [r11+4]
test cl, cl
je $LN37@DrawTile16
; 105064: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN133@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN129@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx edx, dx
movzx r8d, WORD PTR [r9+rax*2]
; 105064: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN411@DrawTile16
$LN129@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx edx, dx
movzx r8d, WORD PTR [r9+rax*2]
; 105064: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN411@DrawTile16
$LN133@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN131@DrawTile16
movzx edx, WORD PTR [r9+rdx]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN132@DrawTile16
$LN131@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR [r9+rdx]
movzx edx, WORD PTR ?GFX@@3USGFX@@A+100
$LN411@DrawTile16:
; 105064: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN132@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105065: GFX.DB[Offset + 3] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN37@DrawTile16:
; 105066: };
; 105067: if (GFX.Z1 > GFX.DB[Offset + 4] && (Pix = bp[3])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+4]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN38@DrawTile16
movzx ecx, BYTE PTR [r11+3]
test cl, cl
je $LN38@DrawTile16
; 105068: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN139@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN135@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105068: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN412@DrawTile16
$LN135@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105068: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN412@DrawTile16
$LN139@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN137@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN138@DrawTile16
$LN137@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN412@DrawTile16:
; 105068: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN138@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105069: GFX.DB[Offset + 4] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN38@DrawTile16:
; 105070: };
; 105071: if (GFX.Z1 > GFX.DB[Offset + 5] && (Pix = bp[2])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+5]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN39@DrawTile16
movzx ecx, BYTE PTR [r11+2]
test cl, cl
je $LN39@DrawTile16
; 105072: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN145@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN141@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105072: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN413@DrawTile16
$LN141@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105072: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN413@DrawTile16
$LN145@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN143@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN144@DrawTile16
$LN143@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN413@DrawTile16:
; 105072: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN144@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105073: GFX.DB[Offset + 5] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN39@DrawTile16:
; 105074: };
; 105075: if (GFX.Z1 > GFX.DB[Offset + 6] && (Pix = bp[1])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+6]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN40@DrawTile16
movzx ecx, BYTE PTR [r11+1]
test cl, cl
je $LN40@DrawTile16
; 105076: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN151@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN147@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105076: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN414@DrawTile16
$LN147@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105076: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN414@DrawTile16
$LN151@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN149@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN150@DrawTile16
$LN149@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN414@DrawTile16:
; 105076: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN150@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105077: GFX.DB[Offset + 6] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN40@DrawTile16:
; 105078: };
; 105079: if (GFX.Z1 > GFX.DB[Offset + 7] && (Pix = bp[0])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r10d, DWORD PTR [rbx+7]
movzx ecx, BYTE PTR [r10+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN5@DrawTile16
movzx ecx, BYTE PTR [r11]
test cl, cl
je $LN5@DrawTile16
; 105080: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN157@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN153@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r10*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105080: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN415@DrawTile16
$LN153@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105080: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN415@DrawTile16
$LN157@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r10+rax], 32 ; 00000020H
je SHORT $LN155@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r10*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN156@DrawTile16
$LN155@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN415@DrawTile16:
; 105080: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN156@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r10*2], r9w
; 105081: GFX.DB[Offset + 7] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r10+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN5@DrawTile16:
; 105050: l--, bp += 8 * 1, Offset += GFX.PPL) {
add ebx, DWORD PTR ?GFX@@3USGFX@@A+68
dec r12d
add r11, 8
test r12d, r12d
jg $LL7@DrawTile16
; 105082: };
; 105083: }
; 105084: }
; 105085: else if (!(Tile & 0x4000)) {
jmp $LN12@DrawTile16
$LN32@DrawTile16:
sub rdi, r15
lea r10, QWORD PTR [rdi+56]
test r14d, r14d
jne $LN42@DrawTile16
; 105086: bp = pCache + 56 - StartLine;
; 105087: ;
; 105088: for (l = LineCount;
; 105089: l > 0;
test r12d, r12d
jle $LN12@DrawTile16
npad 14
$LL10@DrawTile16:
; 105091: if (GFX.Z1 > GFX.DB[Offset + 0] && (Pix = bp[0])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
mov r11d, ebx
movzx ecx, BYTE PTR [rax+r11]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN44@DrawTile16
movzx ecx, BYTE PTR [r10]
test cl, cl
je $LN44@DrawTile16
; 105092: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN163@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [rax+r11], 32 ; 00000020H
je SHORT $LN159@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
jmp SHORT $LN160@DrawTile16
$LN159@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN160@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105092: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN416@DrawTile16
$LN163@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [rax+r11], 32 ; 00000020H
je SHORT $LN161@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN162@DrawTile16
$LN161@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
mov eax, edx
shr eax, 6
mov ecx, r8d
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN416@DrawTile16:
; 105092: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN162@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105093: GFX.DB[Offset + 0] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [rcx+r11], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN44@DrawTile16:
; 105094: };
; 105095: if (GFX.Z1 > GFX.DB[Offset + 1] && (Pix = bp[1])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+1]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN45@DrawTile16
movzx ecx, BYTE PTR [r10+1]
test cl, cl
je $LN45@DrawTile16
; 105096: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN169@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN165@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
jmp SHORT $LN166@DrawTile16
$LN165@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN166@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105096: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN417@DrawTile16
$LN169@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN167@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN168@DrawTile16
$LN167@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
mov eax, edx
shr eax, 6
mov ecx, r8d
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN417@DrawTile16:
; 105096: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN168@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105097: GFX.DB[Offset + 1] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN45@DrawTile16:
; 105098: };
; 105099: if (GFX.Z1 > GFX.DB[Offset + 2] && (Pix = bp[2])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+2]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN46@DrawTile16
movzx ecx, BYTE PTR [r10+2]
test cl, cl
je $LN46@DrawTile16
; 105100: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN175@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN171@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
jmp SHORT $LN172@DrawTile16
$LN171@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN172@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105100: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN418@DrawTile16
$LN175@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN173@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN174@DrawTile16
$LN173@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
mov eax, edx
shr eax, 6
mov ecx, r8d
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN418@DrawTile16:
; 105100: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN174@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105101: GFX.DB[Offset + 2] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN46@DrawTile16:
; 105102: };
; 105103: if (GFX.Z1 > GFX.DB[Offset + 3] && (Pix = bp[3])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+3]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN47@DrawTile16
movzx ecx, BYTE PTR [r10+3]
test cl, cl
je $LN47@DrawTile16
; 105104: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN181@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN177@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
jmp SHORT $LN178@DrawTile16
$LN177@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN178@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105104: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN419@DrawTile16
$LN181@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN179@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN180@DrawTile16
$LN179@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
mov eax, edx
shr eax, 6
mov ecx, r8d
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN419@DrawTile16:
; 105104: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN180@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105105: GFX.DB[Offset + 3] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN47@DrawTile16:
; 105106: };
; 105107: if (GFX.Z1 > GFX.DB[Offset + 4] && (Pix = bp[4])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+4]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN48@DrawTile16
movzx ecx, BYTE PTR [r10+4]
test cl, cl
je $LN48@DrawTile16
; 105108: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN187@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN183@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105108: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN420@DrawTile16
$LN183@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105108: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN420@DrawTile16
$LN187@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN185@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN186@DrawTile16
$LN185@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN420@DrawTile16:
; 105108: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN186@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105109: GFX.DB[Offset + 4] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN48@DrawTile16:
; 105110: };
; 105111: if (GFX.Z1 > GFX.DB[Offset + 5] && (Pix = bp[5])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+5]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN49@DrawTile16
movzx ecx, BYTE PTR [r10+5]
test cl, cl
je $LN49@DrawTile16
; 105112: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN193@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN189@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105112: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN421@DrawTile16
$LN189@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
; 105112: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN421@DrawTile16
$LN193@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN191@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN192@DrawTile16
$LN191@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN421@DrawTile16:
; 105112: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN192@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105113: GFX.DB[Offset + 5] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN49@DrawTile16:
; 105114: };
; 105115: if (GFX.Z1 > GFX.DB[Offset + 6] && (Pix = bp[6])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+6]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN50@DrawTile16
movzx ecx, BYTE PTR [r10+6]
test cl, cl
je $LN50@DrawTile16
; 105116: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN199@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN195@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r11*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105116: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN422@DrawTile16
$LN195@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105116: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN422@DrawTile16
$LN199@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN197@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN198@DrawTile16
$LN197@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN422@DrawTile16:
; 105116: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN198@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105117: GFX.DB[Offset + 6] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN50@DrawTile16:
; 105118: };
; 105119: if (GFX.Z1 > GFX.DB[Offset + 7] && (Pix = bp[7])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+7]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN8@DrawTile16
movzx ecx, BYTE PTR [r10+7]
test cl, cl
je $LN8@DrawTile16
; 105120: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN205@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN201@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r11*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105120: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN423@DrawTile16
$LN201@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105120: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN423@DrawTile16
$LN205@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN203@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN204@DrawTile16
$LN203@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN423@DrawTile16:
; 105120: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN204@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105121: GFX.DB[Offset + 7] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN8@DrawTile16:
; 105090: l--, bp -= 8 * 1, Offset += GFX.PPL) {
add ebx, DWORD PTR ?GFX@@3USGFX@@A+68
dec r12d
sub r10, 8
test r12d, r12d
jg $LL10@DrawTile16
; 105122: };
; 105123: }
; 105124: }
; 105125: else {
jmp $LN12@DrawTile16
$LN42@DrawTile16:
; 105126: bp = pCache + 56 - StartLine;
; 105127: ;
; 105128: for (l = LineCount;
; 105129: l > 0;
test r12d, r12d
jle $LN12@DrawTile16
npad 4
$LL13@DrawTile16:
; 105131: if (GFX.Z1 > GFX.DB[Offset + 0] && (Pix = bp[7])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
mov r11d, ebx
movzx ecx, BYTE PTR [rax+r11]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN52@DrawTile16
movzx ecx, BYTE PTR [r10+7]
test cl, cl
je $LN52@DrawTile16
; 105132: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN211@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [rax+r11], 32 ; 00000020H
je SHORT $LN207@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r11*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105132: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN424@DrawTile16
$LN207@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105132: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN424@DrawTile16
$LN211@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [rax+r11], 32 ; 00000020H
je SHORT $LN209@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN210@DrawTile16
$LN209@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN424@DrawTile16:
; 105132: GFX.S[Offset + 0] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (GFX.SubScreen[Offset + 0]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 0]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 0])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 0])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN210@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105133: GFX.DB[Offset + 0] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [rcx+r11], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN52@DrawTile16:
; 105134: };
; 105135: if (GFX.Z1 > GFX.DB[Offset + 1] && (Pix = bp[6])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+1]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN53@DrawTile16
movzx ecx, BYTE PTR [r10+6]
test cl, cl
je $LN53@DrawTile16
; 105136: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN217@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN213@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r11*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105136: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN425@DrawTile16
$LN213@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105136: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN425@DrawTile16
$LN217@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN215@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN216@DrawTile16
$LN215@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN425@DrawTile16:
; 105136: GFX.S[Offset + 1] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (GFX.SubScreen[Offset + 1]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 1]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 1])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 1])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN216@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105137: GFX.DB[Offset + 1] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN53@DrawTile16:
; 105138: };
; 105139: if (GFX.Z1 > GFX.DB[Offset + 2] && (Pix = bp[5])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+2]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN54@DrawTile16
movzx ecx, BYTE PTR [r10+5]
test cl, cl
je $LN54@DrawTile16
; 105140: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN223@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN219@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r11*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105140: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN426@DrawTile16
$LN219@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105140: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN426@DrawTile16
$LN223@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN221@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN222@DrawTile16
$LN221@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN426@DrawTile16:
; 105140: GFX.S[Offset + 2] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (GFX.SubScreen[Offset + 2]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 2]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 2])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 2])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN222@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105141: GFX.DB[Offset + 2] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN54@DrawTile16:
; 105142: };
; 105143: if (GFX.Z1 > GFX.DB[Offset + 3] && (Pix = bp[4])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+3]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN55@DrawTile16
movzx ecx, BYTE PTR [r10+4]
test cl, cl
je $LN55@DrawTile16
; 105144: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN229@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN225@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx r8d, WORD PTR [rax+r11*2]
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105144: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN427@DrawTile16
$LN225@DrawTile16:
mov r8d, DWORD PTR ?GFX@@3USGFX@@A+100
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, r8w
movzx edx, WORD PTR [r9+rax*2]
; 105144: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp SHORT $LN427@DrawTile16
$LN229@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN227@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN228@DrawTile16
$LN227@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
$LN427@DrawTile16:
; 105144: GFX.S[Offset + 3] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (GFX.SubScreen[Offset + 3]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 3]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 3])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 3])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
mov ecx, r8d
mov eax, edx
shr ecx, 6
shr eax, 6
and ecx, 31
and eax, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN228@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105145: GFX.DB[Offset + 3] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN55@DrawTile16:
; 105146: };
; 105147: if (GFX.Z1 > GFX.DB[Offset + 4] && (Pix = bp[3])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+4]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN56@DrawTile16
movzx ecx, BYTE PTR [r10+3]
test cl, cl
je $LN56@DrawTile16
; 105148: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN235@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN231@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
jmp SHORT $LN232@DrawTile16
$LN231@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN232@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105148: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN428@DrawTile16
$LN235@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN233@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN234@DrawTile16
$LN233@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
mov eax, edx
shr eax, 6
mov ecx, r8d
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN428@DrawTile16:
; 105148: GFX.S[Offset + 4] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (GFX.SubScreen[Offset + 4]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 4]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 4])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 4])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN234@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105149: GFX.DB[Offset + 4] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN56@DrawTile16:
; 105150: };
; 105151: if (GFX.Z1 > GFX.DB[Offset + 5] && (Pix = bp[2])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+5]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN57@DrawTile16
movzx ecx, BYTE PTR [r10+2]
test cl, cl
je $LN57@DrawTile16
; 105152: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN241@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN237@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
jmp SHORT $LN238@DrawTile16
$LN237@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN238@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105152: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN429@DrawTile16
$LN241@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN239@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN240@DrawTile16
$LN239@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
mov eax, edx
shr eax, 6
mov ecx, r8d
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN429@DrawTile16:
; 105152: GFX.S[Offset + 5] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (GFX.SubScreen[Offset + 5]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 5]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 5])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 5])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN240@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105153: GFX.DB[Offset + 5] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN57@DrawTile16:
; 105154: };
; 105155: if (GFX.Z1 > GFX.DB[Offset + 6] && (Pix = bp[1])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+6]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN58@DrawTile16
movzx ecx, BYTE PTR [r10+1]
test cl, cl
je $LN58@DrawTile16
; 105156: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN247@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN243@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
jmp SHORT $LN244@DrawTile16
$LN243@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN244@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105156: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN430@DrawTile16
$LN247@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN245@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN246@DrawTile16
$LN245@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
mov eax, edx
shr eax, 6
mov ecx, r8d
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN430@DrawTile16:
; 105156: GFX.S[Offset + 6] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (GFX.SubScreen[Offset + 6]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 6]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 6])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 6])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN246@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105157: GFX.DB[Offset + 6] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN58@DrawTile16:
; 105158: };
; 105159: if (GFX.Z1 > GFX.DB[Offset + 7] && (Pix = bp[0])) {
mov rax, QWORD PTR ?GFX@@3USGFX@@A+48
lea r11d, DWORD PTR [rbx+7]
movzx ecx, BYTE PTR [r11+rax]
cmp BYTE PTR ?GFX@@3USGFX@@A+96, cl
jbe $LN11@DrawTile16
movzx ecx, BYTE PTR [r10]
test cl, cl
je $LN11@DrawTile16
; 105160: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
test dl, dl
je SHORT $LN253@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN249@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
movzx edx, WORD PTR [rax+r11*2]
jmp SHORT $LN250@DrawTile16
$LN249@DrawTile16:
mov edx, DWORD PTR ?GFX@@3USGFX@@A+100
$LN250@DrawTile16:
movzx eax, cl
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, dx
movzx edx, WORD PTR [r9+rax*2]
mov eax, r8d
shr eax, 6
mov ecx, edx
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, r8d
shr eax, 11
and r8d, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, edx
shr ecx, 11
and edx, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add edx, r8d
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rdx+rsi]
; 105160: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
jmp $LN431@DrawTile16
$LN253@DrawTile16:
movzx eax, cl
lea rdx, QWORD PTR [rax+rax]
mov rax, QWORD PTR ?GFX@@3USGFX@@A+24
movzx edx, WORD PTR [r9+rdx]
test BYTE PTR [r11+rax], 32 ; 00000020H
je SHORT $LN251@DrawTile16
mov rax, QWORD PTR ?GFX@@3USGFX@@A+8
mov r9d, edx
and r9d, -2082 ; fffff7deH
movzx ecx, WORD PTR [rax+r11*2]
and edx, ecx
mov eax, ecx
and eax, -2081 ; fffff7dfH
and edx, 2081 ; 00000821H
add r9d, eax
shr r9d, 1
add r9d, edx
jmp SHORT $LN252@DrawTile16
$LN251@DrawTile16:
; 101553: return ((brightness_cap[ (C1 >> 11) + (C2 >> 11) ] << 11) |
movzx r8d, WORD PTR ?GFX@@3USGFX@@A+100
mov eax, edx
shr eax, 6
mov ecx, r8d
shr ecx, 6
and eax, 31
and ecx, 31
add ecx, eax
mov eax, edx
shr eax, 11
and edx, 31
movzx r9d, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
mov ecx, r8d
shr ecx, 11
and r8d, 31
add ecx, eax
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[rcx+rsi]
shl eax, 5
or r9d, eax
add r8d, edx
movzx eax, BYTE PTR ?brightness_cap@@3PAEA[r8+rsi]
$LN431@DrawTile16:
; 105160: GFX.S[Offset + 7] = (GFX.ClipColors ? (COLOR_ADD((GFX.ScreenColors[Pix]), ((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (GFX.SubScreen[Offset + 7]) : GFX.FixedColour)) : (((GFX.SubZBuffer[Offset + 7]) & 0x20) ? (((((((GFX.ScreenColors[Pix])) & (~(0x0800 | 0x0020 | 0x0001))) + (((GFX.SubScreen[Offset + 7])) & (~(0x0800 | 0x0020 | 0x0001)))) >> 1) + (((GFX.ScreenColors[Pix])) & ((GFX.SubScreen[Offset + 7])) & (0x0800 | 0x0020 | 0x0001))) | 0x0000) : COLOR_ADD((GFX.ScreenColors[Pix]), GFX.FixedColour)));
and r9d, 1023 ; 000003ffH
shl r9d, 6
or r9d, eax
$LN252@DrawTile16:
mov rax, QWORD PTR ?GFX@@3USGFX@@A+40
mov WORD PTR [rax+r11*2], r9w
; 105161: GFX.DB[Offset + 7] = GFX.Z2;
mov rcx, QWORD PTR ?GFX@@3USGFX@@A+48
movzx eax, BYTE PTR ?GFX@@3USGFX@@A+97
mov BYTE PTR [r11+rcx], al
movzx edx, BYTE PTR ?GFX@@3USGFX@@A+116
mov r9, QWORD PTR ?GFX@@3USGFX@@A+80
$LN11@DrawTile16:
; 105130: l--, bp -= 8 * 1, Offset += GFX.PPL) {
add ebx, DWORD PTR ?GFX@@3USGFX@@A+68
dec r12d
sub r10, 8
test r12d, r12d
jg $LL13@DrawTile16
$LN12@DrawTile16:
mov rdi, QWORD PTR [rsp+64]
; 105162: };
; 105163: }
; 105164: };
; 105165:
; 105166: }
mov rbx, QWORD PTR [rsp+72]
mov rbp, QWORD PTR [rsp+80]
mov rsi, QWORD PTR [rsp+88]
add rsp, 32 ; 00000020H
pop r15
pop r14
pop r12
ret 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment