PROC__00465C20h:
PUSH EBP
MOV EBP, ESP
SUB ESP, 28h
PUSH EBX
PUSH ESI
PUSH EDI
MOV DWORD PTR [EBP-08h], ECX
MOV DWORD PTR [EBP-04h], EDX
MOV EBX, EAX
MOV ESI, DWORD PTR [EBP+18h]
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
MOV EDX, ESI
CALL PROC__0040F72Ch
MOV EDI, EAX
MOV EAX, DWORD PTR [EDI+608h] ; CharSet Width
PUSH 12
POP ECX
CDQ
IDIV EAX, ECX ; CharSet Width / 12 = Frame Width
PUSH EAX
LEA EAX, [EAX+EAX*2] ; Frame Width * 3 = Character Box Width
XOR ECX, ECX
MOV EDX, DWORD PTR [EBP+14h] ; Character Slot (Top: 0_1_2_3, Bottom: 4_5_6_7)
INC EDX
CMP EDX, 5
JB LoopSlot
SUB EDX, 4 ; Simplify Slot Management: 0=4 1=5 2=6 3=7
LoopSlot:
ADD ECX, EAX
DEC EDX
JNZ LoopSlot
SUB ECX, EAx
POP EAX
MOV EDX, DWORD PTR [EBP+0Ch] ; Character Step ([0], [1|3], [2])
INC EDX
CMP EDX, 4
JNE LoopX
SUB EDX, 2 ; Trait InMove-StandFrame (3) like Idle (1)
LoopX:
ADD ECX, EAX
DEC EDX
JNZ LoopX
SUB ECX, EAX
MOV DWORD PTR [EBP-18h], ECX
MOV EDI, DWORD PTR [EDI+60Ch] ; CharSet Height
SHR EDI, 3 ; CharSet Height / 8 = Frame Height
MOV ECX, DWORD PTR [EBP+10h]
INC ECX
XOR EDX, EDX
CMP BYTE PTR [EBP+14h], 4
JB LoopY
MOV EDX, EDI
SHL EDX, 2
LoopY:
ADD EDX, EDI
DEC ECX
JNZ LoopY
SUB EDX, EDI
MOV DWORD PTR [EBP-14h], EDX
PUSH EBX
PUSH ESI
MOV EBX, DWORD PTR [EBP-08h]
MOV ESI, EAX
SHR ESI, 1
SUB EBX, ESI
TEST EBX, EBX
JGE TotallyFine
SUB DWORD PTR [EBP-18h], EBX
ADD EAX, EBX
SAR EBX, 1
SUB DWORD PTR [EBP-08h], EBX
TotallyFine:
POP ESI
POP EBX
PUSH EDI
PUSH EAX
PUSH EDI
LEA EDX, [EBP-28h]
PUSH EDX
MOV ECX, EAX
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__0040ECD0h ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__0040F72Ch
MOV DL, BYTE PTR [EBX+10h]
MOV BYTE PTR [EAX+610h], DL
PUSH 100
CMP BYTE PTR [EBX+18h], 0
JZ NopeSkip
PUSH 0
JMP DoubleNope
NopeSkip:
PUSH 100
DoubleNope:
PUSH 1
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__0040F72Ch
MOV EAX, DWORD PTR [EAX+61Ch]
PUSH 100
POP ECX
PUSH 100
POP EDX
CALL PROC__00450FACh
JudgeGroundBush:
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040F72Ch
MOV AL, BYTE PTR [EBP+08h] ; BushType
SUB AL, 1
JC BushTypeNormal ; Normal
JZ BushTypeThird ; Third
DEC AL
JZ BushTypeHalf ; Half
DEC AL
JZ BushTypeFull ; Full
JMP Finish
BushTypeNormal:
CALL PROC__CalculateOpacity
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 100%
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040F72Ch
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__004527D0h
JMP Finish
BushTypeThird:
MOV EDI, 11
JMP BushTypePartly
BushTypeHalf:
MOV EDI, 16
BushTypePartly:
CALL PROC__CalculateOpacity
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 100%
MOV EAX, DWORD PTR [ESP+04h] ; Character Height
SUB EAX, EDI ; Character Height - 11 or 16
TEST EAX, EAX
JLE BushTypePartlyLower ; Skip upper Part (smaller than 12 or 17)
PUSH EAX ; Character Height - 11 or 16
LEA EAX, [EBP-28h]
PUSH EAX
MOV ECX, DWORD PTR [ESP+08h] ; Character Width
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__0040ECD0h ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040F72Ch
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__004527D0h
BushTypePartlyLower:
CALL PROC__CalculateOpacity
SAR ECX, 1
JNS BushTypePartlyNoCarry
ADC ECX, 0 ; (BaseOpacity - (TrLevel * 30)) / 2
BushTypePartlyNoCarry:
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 50%
MOV EAX, DWORD PTR [ESP+04h] ; Character Height
CMP EAX, EDI
JLE BushTypePartlyLowerOkay
PUSH EDI ; Get 11 or 16 if Character Height is above 11 or 16
JMP BushTypePartlyLowerBig
BushTypePartlyLowerOkay:
PUSH EAX ; Character Height is below or equal 11 or 16
BushTypePartlyLowerBig:
LEA EAX, [EBP-28h]
PUSH EAX
MOV ECX, DWORD PTR [ESP+08h] ; Character Width (08h + ESP Shift 08h)
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
ADD EDX, DWORD PTR [ESP+0Ch] ; Character Height (0Ch + ESP Shift 08h)
SUB EDX, EDI ; SourceY + Height - {11 or 16}
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__0040ECD0h ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040F72Ch
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
ADD ECX, DWORD PTR [ESP+0Ch] ; Character Height (0Ch + ESP Shift 08h)
SUB ECX, EDI ; ScreenY - {11 or 16}
CALL PROC__004527D0h
JMP Finish
BushTypeFull:
CALL PROC__CalculateOpacity
SAR ECX, 1
JNS BushTypeFullNoCarry
ADC ECX, 0
BushTypeFullNoCarry:
MOV DWORD PTR [EAX+614h], ECX ; Set Visibility to relative 50%
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040F72Ch
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__004527D0h
Finish:
POP EDI
POP EDI
POP EDI
POP ESI
POP EBX
MOV ESP, EBP
POP EBP
RET 0018h
NOP
NOP
NOP
PROC__GetPositionBase:
MOV ECX, DWORD PTR [EBP+1Ch] ; ScreenY
SUB ECX, DWORD PTR [ESP+10h] ; ScreenY - Character Height {ESP shifted}
MOV EDX, DWORD PTR [EBP-08h] ; ScreenX
SHL EDX, 1 ; ScreenX * 2
SUB EDX, DWORD PTR [ESP+0Ch] ; (ScreenX * 2) - Character Width {ESP shifted}
SHR EDX, 1 ; ((ScreenX * 2) - Character Width) / 2
MOV EAX, DWORD PTR [EBP-04h]
RET
NOP
NOP
PROC__DeportRectData:
PUSH ESI
PUSH EDI
LEA ESI, [EBP-28h]
LEA EDI, [EBP-18h]
MOVSD
MOVSD
MOVSD
MOVSD
POP EDI
POP ESI
RET
NOP
PROC__CalculateOpacity:
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__0040F72Ch
IMUL EDX, [EBX+14h], 30 ; Character's TransparencyLevel * 30
XOR ECX, ECX
MOV CL, 255 ; BaseOpacity
SUB ECX, EDX ; BaseOpacity - (TransparencyLevel * 30)
RET
NOP
NOP
NOP
(220 more NOPs...)
PROC__0046B52Ch:
PUSH EBP
MOV EBP, ESP
SUB ESP, 28h
PUSH EBX
PUSH ESI
PUSH EDI
MOV DWORD PTR [EBP-08h], ECX
MOV DWORD PTR [EBP-04h], EDX
MOV EBX, EAX
MOV ESI, DWORD PTR [EBP+18h]
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
MOV EDX, ESI
CALL PROC__0040FBC8h
MOV EDI, EAX
MOV EAX, DWORD PTR [EDI+608h] ; CharSet Width
PUSH 12
POP ECX
CDQ
IDIV EAX, ECX ; CharSet Width / 12 = Frame Width
PUSH EAX
LEA EAX, [EAX+EAX*2] ; Frame Width * 3 = Character Box Width
XOR ECX, ECX
MOV EDX, DWORD PTR [EBP+14h] ; Character Slot (Top: 0_1_2_3, Bottom: 4_5_6_7)
INC EDX
CMP EDX, 5
JB LoopSlot
SUB EDX, 4 ; Simplify Slot Management: 0=4 1=5 2=6 3=7
LoopSlot:
ADD ECX, EAX
DEC EDX
JNZ LoopSlot
SUB ECX, EAx
POP EAX
MOV EDX, DWORD PTR [EBP+0Ch] ; Character Step ([0], [1|3], [2])
INC EDX
CMP EDX, 4
JNE LoopX
SUB EDX, 2 ; Trait InMove-StandFrame (3) like Idle (1)
LoopX:
ADD ECX, EAX
DEC EDX
JNZ LoopX
SUB ECX, EAX
MOV DWORD PTR [EBP-18h], ECX
MOV EDI, DWORD PTR [EDI+60Ch] ; CharSet Height
SHR EDI, 3 ; CharSet Height / 8 = Frame Height
MOV ECX, DWORD PTR [EBP+10h]
INC ECX
XOR EDX, EDX
CMP BYTE PTR [EBP+14h], 4
JB LoopY
MOV EDX, EDI
SHL EDX, 2
LoopY:
ADD EDX, EDI
DEC ECX
JNZ LoopY
SUB EDX, EDI
MOV DWORD PTR [EBP-14h], EDX
PUSH EBX
PUSH ESI
MOV EBX, DWORD PTR [EBP-08h]
MOV ESI, EAX
SHR ESI, 1
SUB EBX, ESI
TEST EBX, EBX
JGE TotallyFine
SUB DWORD PTR [EBP-18h], EBX
ADD EAX, EBX
SAR EBX, 1
SUB DWORD PTR [EBP-08h], EBX
TotallyFine:
POP ESI
POP EBX
PUSH EDI
PUSH EAX
PUSH EDI
LEA EDX, [EBP-28h]
PUSH EDX
MOV ECX, EAX
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__0040F16Ch ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__0040FBC8h
MOV DL, BYTE PTR [EBX+10h]
MOV BYTE PTR [EAX+610h], DL
PUSH 100
CMP BYTE PTR [EBX+18h], 0
JZ NopeSkip
PUSH 0
JMP DoubleNope
NopeSkip:
PUSH 100
DoubleNope:
PUSH 1
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__0040FBC8h
MOV EAX, DWORD PTR [EAX+61Ch]
PUSH 100
POP ECX
PUSH 100
POP EDX
CALL PROC__00451878h
JudgeGroundBush:
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040FBC8h
MOV AL, BYTE PTR [EBP+08h] ; BushType
SUB AL, 1
JC BushTypeNormal ; Normal
JZ BushTypeThird ; Third
DEC AL
JZ BushTypeHalf ; Half
DEC AL
JZ BushTypeFull ; Full
JMP Finish
BushTypeNormal:
CALL PROC__CalculateOpacity
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 100%
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040FBC8h
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__0045309Ch
JMP Finish
BushTypeThird:
MOV EDI, 11
JMP BushTypePartly
BushTypeHalf:
MOV EDI, 16
BushTypePartly:
CALL PROC__CalculateOpacity
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 100%
MOV EAX, DWORD PTR [ESP+04h] ; Character Height
SUB EAX, EDI ; Character Height - 11 or 16
TEST EAX, EAX
JLE BushTypePartlyLower ; Skip upper Part (smaller than 12 or 17)
PUSH EAX ; Character Height - 11 or 16
LEA EAX, [EBP-28h]
PUSH EAX
MOV ECX, DWORD PTR [ESP+08h] ; Character Width
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__0040F16Ch ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040FBC8h
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__0045309Ch
BushTypePartlyLower:
CALL PROC__CalculateOpacity
SAR ECX, 1
JNS BushTypePartlyNoCarry
ADC ECX, 0 ; (BaseOpacity - (TrLevel * 30)) / 2
BushTypePartlyNoCarry:
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 50%
MOV EAX, DWORD PTR [ESP+04h] ; Character Height
CMP EAX, EDI
JLE BushTypePartlyLowerOkay
PUSH EDI ; Get 11 or 16 if Character Height is above 11 or 16
JMP BushTypePartlyLowerBig
BushTypePartlyLowerOkay:
PUSH EAX ; Character Height is below or equal 11 or 16
BushTypePartlyLowerBig:
LEA EAX, [EBP-28h]
PUSH EAX
MOV ECX, DWORD PTR [ESP+08h] ; Character Width (08h + ESP Shift 08h)
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
ADD EDX, DWORD PTR [ESP+0Ch] ; Character Height (0Ch + ESP Shift 08h)
SUB EDX, EDI ; SourceY + Height - {11 or 16}
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__0040F16Ch ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040FBC8h
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
ADD ECX, DWORD PTR [ESP+0Ch] ; Character Height (0Ch + ESP Shift 08h)
SUB ECX, EDI ; ScreenY - {11 or 16}
CALL PROC__0045309Ch
JMP Finish
BushTypeFull:
CALL PROC__CalculateOpacity
SAR ECX, 1
JNS BushTypeFullNoCarry
ADC ECX, 0
BushTypeFullNoCarry:
MOV DWORD PTR [EAX+614h], ECX ; Set Visibility to relative 50%
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__0040FBC8h
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__0045309Ch
Finish:
POP EDI
POP EDI
POP EDI
POP ESI
POP EBX
MOV ESP, EBP
POP EBP
RET 0018h
NOP
NOP
NOP
PROC__GetPositionBase:
MOV ECX, DWORD PTR [EBP+1Ch] ; ScreenY
SUB ECX, DWORD PTR [ESP+10h] ; ScreenY - Character Height {ESP shifted}
MOV EDX, DWORD PTR [EBP-08h] ; ScreenX
SHL EDX, 1 ; ScreenX * 2
SUB EDX, DWORD PTR [ESP+0Ch] ; (ScreenX * 2) - Character Width {ESP shifted}
SHR EDX, 1 ; ((ScreenX * 2) - Character Width) / 2
MOV EAX, DWORD PTR [EBP-04h]
RET
NOP
NOP
PROC__DeportRectData:
PUSH ESI
PUSH EDI
LEA ESI, [EBP-28h]
LEA EDI, [EBP-18h]
MOVSD
MOVSD
MOVSD
MOVSD
POP EDI
POP ESI
RET
NOP
PROC__CalculateOpacity:
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__0040FBC8h
IMUL EDX, [EBX+14h], 30 ; Character's TransparencyLevel * 30
XOR ECX, ECX
MOV CL, 255 ; BaseOpacity
SUB ECX, EDX ; BaseOpacity - (TransparencyLevel * 30)
RET
NOP
NOP
NOP
(220 more NOPs...)
PROC__00483CC4h:
PUSH EBP
MOV EBP, ESP
SUB ESP, 28h
PUSH EBX
PUSH ESI
PUSH EDI
MOV DWORD PTR [EBP-08h], ECX
MOV DWORD PTR [EBP-04h], EDX
MOV EBX, EAX
MOV ESI, DWORD PTR [EBP+1Ch]
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
MOV EDX, ESI
CALL PROC__00417738h
MOV EDI, EAX
MOV EAX, DWORD PTR [EDI+608h] ; CharSet Width
PUSH 12
POP ECX
CDQ
IDIV EAX, ECX ; CharSet Width / 12 = Frame Width
PUSH EAX
LEA EAX, [EAX+EAX*2] ; Frame Width * 3 = Character Box Width
XOR ECX, ECX
MOV EDX, DWORD PTR [EBP+18h] ; Character Slot (Top: 0_1_2_3, Bottom: 4_5_6_7)
INC EDX
CMP EDX, 5
JB LoopSlot
SUB EDX, 4 ; Simplify Slot Management: 0=4 1=5 2=6 3=7
LoopSlot:
ADD ECX, EAX
DEC EDX
JNZ LoopSlot
SUB ECX, EAx
POP EAX
MOV EDX, DWORD PTR [EBP+10h] ; Character Step ([0], [1|3], [2])
INC EDX
CMP EDX, 4
JNE LoopX
SUB EDX, 2 ; Trait InMove-StandFrame (3) like Idle (1)
LoopX:
ADD ECX, EAX
DEC EDX
JNZ LoopX
SUB ECX, EAX
MOV DWORD PTR [EBP-18h], ECX
MOV EDI, DWORD PTR [EDI+60Ch] ; CharSet Height
SHR EDI, 3 ; CharSet Height / 8 = Frame Height
MOV ECX, DWORD PTR [EBP+14h]
INC ECX
XOR EDX, EDX
CMP BYTE PTR [EBP+18h], 4
JB LoopY
MOV EDX, EDI
SHL EDX, 2
LoopY:
ADD EDX, EDI
DEC ECX
JNZ LoopY
SUB EDX, EDI
MOV DWORD PTR [EBP-14h], EDX
PUSH EBX
PUSH ESI
MOV EBX, DWORD PTR [EBP-08h]
MOV ESI, EAX
SHR ESI, 1
SUB EBX, ESI
TEST EBX, EBX
JGE TotallyFine
SUB DWORD PTR [EBP-18h], EBX
ADD EAX, EBX
SAR EBX, 1
SUB DWORD PTR [EBP-08h], EBX
TotallyFine:
POP ESI
POP EBX
PUSH EDI
PUSH EAX
PUSH EDI
LEA EDX, [EBP-28h]
PUSH EDX
MOV ECX, EAX
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__00416140h ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__00417738h
MOV DL, BYTE PTR [EBX+10h]
MOV BYTE PTR [EAX+610h], DL
PUSH 100
CMP BYTE PTR [EBX+18h], 0
JZ NopeSkip
PUSH 0
JMP DoubleNope
NopeSkip:
PUSH 100
DoubleNope:
PUSH 1
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__00417738h
MOV EAX, DWORD PTR [EAX+61Ch]
PUSH 100
POP ECX
PUSH 100
POP EDX
CALL PROC__00466C40h
JudgeGroundBush:
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__00417738h
MOV AL, BYTE PTR [EBP+0Ch] ; BushType
SUB AL, 1
JC BushTypeNormal ; Normal
JZ BushTypeThird ; Third
DEC AL
JZ BushTypeHalf ; Half
DEC AL
JZ BushTypeFull ; Full
JMP Finish
BushTypeNormal:
CALL PROC__CalculateOpacity
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 100%
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__00417738h
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__004684C0h
JMP Finish
BushTypeThird:
MOV EDI, 11
JMP BushTypePartly
BushTypeHalf:
MOV EDI, 16
BushTypePartly:
CALL PROC__CalculateOpacity
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 100%
MOV EAX, DWORD PTR [ESP+04h] ; Character Height
SUB EAX, EDI ; Character Height - 11 or 16
TEST EAX, EAX
JLE BushTypePartlyLower ; Skip upper Part (smaller than 12 or 17)
PUSH EAX ; Character Height - 11 or 16
LEA EAX, [EBP-28h]
PUSH EAX
MOV ECX, DWORD PTR [ESP+08h] ; Character Width
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__00416140h ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__00417738h
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__004684C0h
BushTypePartlyLower:
CALL PROC__CalculateOpacity
SAR ECX, 1
JNS BushTypePartlyNoCarry
ADC ECX, 0 ; (BaseOpacity - (TrLevel * 30)) / 2
BushTypePartlyNoCarry:
MOV DWORD PTR [EAX+614h], ECX ; Set Opacity to relative 50%
MOV EAX, DWORD PTR [ESP+04h] ; Character Height
CMP EAX, EDI
JLE BushTypePartlyLowerOkay
PUSH EDI ; Get 11 or 16 if Character Height is above 11 or 16
JMP BushTypePartlyLowerBig
BushTypePartlyLowerOkay:
PUSH EAX ; Character Height is below or equal 11 or 16
BushTypePartlyLowerBig:
LEA EAX, [EBP-28h]
PUSH EAX
MOV ECX, DWORD PTR [ESP+08h] ; Character Width (08h + ESP Shift 08h)
MOV EDX, DWORD PTR [EBP-14h] ; SourceY
ADD EDX, DWORD PTR [ESP+0Ch] ; Character Height (0Ch + ESP Shift 08h)
SUB EDX, EDI ; SourceY + Height - {11 or 16}
MOV EAX, DWORD PTR [EBP-18h] ; SourceX
CALL PROC__00416140h ; -28h=SrcX, -24h=SrcY, -20h=W+SrcX, -1Ch=H+SrcY
CALL PROC__DeportRectData
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__00417738h
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
ADD ECX, DWORD PTR [ESP+0Ch] ; Character Height (0Ch + ESP Shift 08h)
SUB ECX, EDI ; ScreenY - {11 or 16}
CALL PROC__004684C0h
JMP Finish
BushTypeFull:
CALL PROC__CalculateOpacity
SAR ECX, 1
JNS BushTypeFullNoCarry
ADC ECX, 0
BushTypeFullNoCarry:
MOV DWORD PTR [EAX+614h], ECX ; Set Visibility to relative 50%
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h] ; AuroraSheet
CALL PROC__00417738h
PUSH EAX
LEA EAX, [EBP-18h]
PUSH EAX
CALL PROC__GetPositionBase
CALL PROC__004684C0h
Finish:
POP EDI
POP EDI
POP EDI
POP ESI
POP EBX
MOV ESP, EBP
POP EBP
RET 001Ch
NOP
NOP
NOP
PROC__GetPositionBase:
MOV ECX, DWORD PTR [EBP+20h] ; ScreenY
SUB ECX, DWORD PTR [ESP+10h] ; ScreenY - Character Height {ESP shifted}
MOV EDX, DWORD PTR [EBP-08h] ; ScreenX
SHL EDX, 1 ; ScreenX * 2
SUB EDX, DWORD PTR [ESP+0Ch] ; (ScreenX * 2) - Character Width {ESP shifted}
SHR EDX, 1 ; ((ScreenX * 2) - Character Width) / 2
MOV EAX, DWORD PTR [EBP-04h]
RET
NOP
NOP
PROC__DeportRectData:
PUSH ESI
PUSH EDI
LEA ESI, [EBP-28h]
LEA EDI, [EBP-18h]
MOVSD
MOVSD
MOVSD
MOVSD
POP EDI
POP ESI
RET
NOP
PROC__CalculateOpacity:
MOV EDX, ESI
MOV EAX, DWORD PTR [EBX+08h]
CALL PROC__00417738h
IMUL EDX, [EBX+14h], 30 ; Character's TransparencyLevel * 30
XOR ECX, ECX
MOV CL, 255 ; BaseOpacity
SUB ECX, EDX ; BaseOpacity - (TransparencyLevel * 30)
RET
NOP
NOP
NOP
(1020 more NOPs...)