FlexibleWalker EX+α

Replaces the entirety of the engine's CharSet-graphics rendering process and removes their strict size-standard of 24×32 per frame, 72×128 per character and 288×256 pixels per file. Instead, the character-size will be calculated automatically by dividing the actual full image-width by 12 and the image-height by 8, this also means that graphic-files are not allowed to be too small or big to function properly.

This is a completely rewritten iteration of previously released FlexibleWalker's concept that finally supports correct display of characters walking through tiles with terrains that have a bush-setting of third, half or full.

In versions for RPG2003, the unused CharSet2-feature's code gets completely wiped by this patch.

Originally made and first released by KotatsuAkira.

RPG2000
1.00UNKNOWN2000-05-072000-06-192000-07-112000-11-132000-11-152000-12-27
1.07
2001-05-05
1.10
2003-03-27
1.50
2003-06-25
1.51/1.52
2015-07-05
1.60
2015-09-15
1.61
2017-09-14
1.62
RPG2003
1.00UNKNOWN1UNKNOWN21.0.2.1
1.0.2.1
1.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.6.0
1.0.6.0
1.0.7.0
1.0.7.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414

Segment 1/2

Offsets

RPG2000
2000-12-27
1.07
2017-09-14
1.62
00465B88h
00064F88h
0046B494h
0006A894h
RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00483BAEh
00082FAEh

Sourcecode

			MOV BYTE PTR [EDI+618h], 1			; Prevent strict image sizing
			JMP __00465B99h
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			MOV BYTE PTR [EDI+618h], 1			; Prevent strict image sizing
			JMP __0046B4A5h
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			MOV BYTE PTR [EDI+618h], 1			; Prevent strict image sizing
			JMP __00483B6Ah
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP

Bytes

C6871806000001 EB08
90 90 90 90 90 90 90 90
C6871806000001 EB08
90 90 90 90 90 90 90 90
C6871806000001 EB13
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90

Segment 2/2

Offsets

RPG2000
2000-12-27
1.07
2017-09-14
1.62
00465C20h
00065020h
0046B52Ch
0006A92Ch
RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00483CC4h
000830C4h

Sourcecode

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...)

Bytes

55 89E5 83EC28 53 56 57 894DF8 8955FC 89C3 8B7518 8B4308 89F2 E8EE9AFAFF
89C7 8B8708060000 6A0C 59 99 F7F9 50 8D0440 31C9 8B5514 42 83FA05 7203
83EA04 01C1 4A 75FB
29C1 58 8B550C 42 83FA04 7503
83EA02 01C1 4A 75FB
29C1 894DE8 8BBF0C060000 C1EF03 8B4D10 41 31D2 807D1404 7205
89FA C1E202 01FA 49 75FB
29FA 8955EC 53 56 8B5DF8 89C6 D1EE 29F3 85DB 7D0A
295DE8 01D8 D1FB 295DF8 5E 5B 57 50 57 8D55D8 52 89C1 8B55EC 8B45E8 E80190FAFF
E88C010000
89F2 8B4308 E84E9AFAFF
8A5310 889010060000 6A64 807B1800 7404
6A00 EB02
6A64 6A01 89F2 8B4308 E82B9AFAFF
8B801C060000 6A64 59 6A64 5A E89AB2FEFF
89F2 8B4308 E8109AFAFF
8A4508 2C01 7213
743A
FEC8 743D
FEC8 0F84DE000000
E904010000
E835010000
898814060000 89F2 8B4308 E8E199FAFF
50 8D45E8 50 E8F3000000
E876CAFEFF
E9DB000000
BF0B000000 EB05
BF10000000 E800010000
898814060000 8B442404 29F8 85C0 7E32
50 8D45D8 50 8B4C2408 8B55EC 8B45E8 E83C8FFAFF
E8C7000000
89F2 8B4308 E88999FAFF
50 8D45E8 50 E89B000000
E81ECAFEFF
E8B9000000
D1F9 7903
83D100 898814060000 8B442404 39F8 7E03
57 EB01
50 8D45D8 50 8B4C2408 8B55EC 0354240C 29FA 8B45E8 E8E78EFAFF
E872000000 89F2 8B4308 E83499FAFF
50 8D45E8 50 E846000000
034C240C 29F9 E8C3C9FEFF
EB2B
E85C000000
D1F9 7903
83D100 898814060000 89F2 8B4308 E80199FAFF
50 8D45E8 50 E813000000
E896C9FEFF
5F 5F 5F 5E 5B 89EC 5D C21800 90 8D00

8B4D1C 2B4C2410 8B55F8 D1E2 2B54240C D1EA 8B45FC C3 8D00

56 57 8D75D8 8D7DE8 A5 A5 A5 A5 5F 5E C3 90

89F2 8B4308 E8B298FAFF
6B53141E 31C9 B1FF 29D1 C3 8D4000
55 89E5 83EC28 53 56 57 894DF8 8955FC 89C3 8B7518 8B4308 89F2 E87E46FAFF
89C7 8B8708060000 6A0C 59 99 F7F9 50 8D0440 31C9 8B5514 42 83FA05 7203
83EA04 01C1 4A 75FB
29C1 58 8B550C 42 83FA04 7503
83EA02 01C1 4A 75FB
29C1 894DE8 8BBF0C060000 C1EF03 8B4D10 41 31D2 807D1404 7205
89FA C1E202 01FA 49 75FB
29FA 8955EC 53 56 8B5DF8 89C6 D1EE 29F3 85DB 7D0A
295DE8 01D8 D1FB 295DF8 5E 5B 57 50 57 8D55D8 52 89C1 8B55EC 8B45E8 E8913BFAFF
E88C010000
89F2 8B4308 E8DE45FAFF
8A5310 889010060000 6A64 807B1800 7404
6A00 EB02
6A64 6A01 89F2 8B4308 E8BB45FAFF
8B801C060000 6A64 59 6A64 5A E85A62FEFF
89F2 8B4308 E8A045FAFF
8A4508 2C01 7213
743A
FEC8 743D
FEC8 0F84DE000000
E904010000
E835010000
898814060000 89F2 8B4308 E87145FAFF
50 8D45E8 50 E8F3000000
E8367AFEFF
E9DB000000
BF0B000000 EB05
BF10000000 E800010000
898814060000 8B442404 29F8 85C0 7E32
50 8D45D8 50 8B4C2408 8B55EC 8B45E8 E8CC3AFAFF
E8C7000000
89F2 8B4308 E81945FAFF
50 8D45E8 50 E89B000000
E8DE79FEFF
E8B9000000
D1F9 7903
83D100 898814060000 8B442404 39F8 7E03
57 EB01
50 8D45D8 50 8B4C2408 8B55EC 0354240C 29FA 8B45E8 E8773AFAFF
E872000000 89F2 8B4308 E8C444FAFF
50 8D45E8 50 E846000000
034C240C 29F9 E88379FEFF
EB2B
E85C000000
D1F9 7903
83D100 898814060000 89F2 8B4308 E89144FAFF
50 8D45E8 50 E813000000
E85679FEFF
5F 5F 5F 5E 5B 89EC 5D C21800 90 8D00

8B4D1C 2B4C2410 8B55F8 D1E2 2B54240C D1EA 8B45FC C3 8D00

56 57 8D75D8 8D7DE8 A5 A5 A5 A5 5F 5E C3 90

89F2 8B4308 E84244FAFF
6B53141E 31C9 B1FF 29D1 C3 90 89C0
55 89E5 83EC28 53 56 57 894DF8 8955FC 89C3 8B751C 8B4308 89F2 E8563AF9FF
89C7 8B8708060000 6A0C 59 99 F7F9 50 8D0440 31C9 8B5518 42 83FA05 7203
83EA04 01C1 4A 75FB
29C1 58 8B5510 42 83FA04 7503
83EA02 01C1 4A 75FB
29C1 894DE8 8BBF0C060000 C1EF03 8B4D14 41 31D2 807D1804 7205
89FA C1E202 01FA 49 75FB
29FA 8955EC 53 56 8B5DF8 89C6 D1EE 29F3 85DB 7D0A
295DE8 01D8 D1FB 295DF8 5E 5B 57 50 57 8D55D8 52 89C1 8B55EC 8B45E8 E8CD23F9FF
E88C010000
89F2 8B4308 E8B639F9FF
8A5310 889010060000 6A64 807B1800 7404
6A00 EB02
6A64 6A01 89F2 8B4308 E89339F9FF
8B801C060000 6A64 59 6A64 5A E88A2EFEFF
89F2 8B4308 E87839F9FF
8A450C 2C01 7213
743A
FEC8 743D
FEC8 0F84DE000000
E904010000
E835010000
898814060000 89F2 8B4308 E84939F9FF
50 8D45E8 50 E8F3000000
E8C246FEFF
E9DB000000
BF0B000000 EB05
BF10000000 E800010000
898814060000 8B442404 29F8 85C0 7E32
50 8D45D8 50 8B4C2408 8B55EC 8B45E8 E80823F9FF
E8C7000000
89F2 8B4308 E8F138F9FF
50 8D45E8 50 E89B000000
E86A46FEFF
E8B9000000
D1F9 7903
83D100 898814060000 8B442404 39F8 7E03
57 EB01
50 8D45D8 50 8B4C2408 8B55EC 0354240C 29FA 8B45E8 E8B322F9FF
E872000000
89F2 8B4308 E89C38F9FF
50 8D45E8 50 E846000000
034C240C 29F9 E80F46FEFF
EB2B
E85C000000
D1F9 7903
83D100 898814060000 89F2 8B4308 E86938F9FF
50 8D45E8 50 E813000000
E8E245FEFF
5F 5F 5F 5E 5B 89EC 5D C21C00 90 8D00

8B4D20 2B4C2410 8B55F8 D1E2 2B54240C D1EA 8B45FC C3 8D00

56 57 8D75D8 8D7DE8 A5 A5 A5 A5 5F 5E C3 90

89F2 8B4308 E81A38F9FF
6B53141E 31C9 B1FF 29D1 C3 90 89C0