BushPointer

Addon for FlexibleWalker EX+α that can be patched over it to make bush-settings of terrain depend on variables and being way more flexible.

From variable #1001 onward, values will tell the system how high the bushline is to be set for them and from #2001 on, there will be factors between 0 (invisible) and 255 (100%) of how strong the relative visibility of all pixels of a character that are below the bushline will be.

Terrains that have bush being set to full in the database still display all characters completely at 50% opacity.

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/4

Offsets

RPG2000
2000-12-27
1.07
2017-09-14
1.62
00465D12h
00065112h
0046B61Eh
0006AA1Eh
RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00483DB6h
000831B6h
00483DB6h
000831B6h

Sourcecode

			CMP BYTE PTR [EBP+08h], 3
			JE BushTypeFull
			CALL PROC__VarBushLines
			TEST EDI, EDI
			JG __BushTypePartlyCheckBP
			JMP __BushTypeNormal
			NOP
			NOP
			NOP
			NOP
			NOP
			CMP BYTE PTR [EBP+08h], 3
			JE BushTypeFull
			CALL PROC__VarBushLines
			TEST EDI, EDI
			JG __BushTypePartlyCheckBP
			JMP __BushTypeNormal
			NOP
			NOP
			NOP
			NOP
			NOP
			CMP BYTE PTR [EBP+08h], 3
			JE BushTypeFull
			CALL PROC__VarBushLines
			TEST EDI, EDI
			JG __BushTypePartlyCheckBP
			JMP __BushTypeNormal
			NOP
			NOP
			NOP
			NOP
			NOP
			CMP BYTE PTR [EBP+08h], 3
			JE BushTypeFull
			CALL PROC__VarBushLines
			TEST EDI, EDI
			JG __BushTypePartlyCheckBP
			JMP __BushTypeNormal
			NOP
			NOP
			NOP
			NOP
			NOP

Bytes

89F2 8B4308 E8109AFAFF
807D0803 0F84E9000000
E85D010000
85FF 7F32 EB05
90 90 90 90 90
89F2 8B4308 E8A045FAFF
807D0803 0F84E9000000
E85D010000
85FF 7F32 EB05
90 90 90 90 90
89F2 8B4308 E87839F9FF
807D0803 0F84E9000000
E85D010000
85FF 7F32 EB05
90 90 90 90 90
89F2 8B4308 E87839F9FF
807D0803 0F84E9000000
E85D010000
85FF 7F32 EB05
90 90 90 90 90

Segment 2/4

Offsets

RPG2000
2000-12-27
1.07
2017-09-14
1.62
00465D5Fh
0006515Fh
0046B66Bh
0006AA6Bh
RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00483E03h
00083203h
00483E03h
00083203h

Sourcecode

__BushTypeThird:
			NOP
			NOP
__BushTypePartlyCheckBP:
			CMP EDI, DWORD PTR [ESP+04h]
			JLE __BushTypePartlyBP
			MOV EDI, [ESP+04h]
__BushTypePartlyBP:
			(...)
__BushTypeThird:
			NOP
			NOP
__BushTypePartlyCheckBP:
			CMP EDI, DWORD PTR [ESP+04h]
			JLE __BushTypePartlyBP
			MOV EDI, [ESP+04h]
__BushTypePartlyBP:
			(...)
__BushTypeThird:
			NOP
			NOP
__BushTypePartlyCheckBP:
			CMP EDI, DWORD PTR [ESP+04h]
			JLE __BushTypePartlyBP
			MOV EDI, [ESP+04h]
__BushTypePartlyBP:
			(...)
__BushTypeThird:
			NOP
			NOP
__BushTypePartlyCheckBP:
			CMP EDI, DWORD PTR [ESP+04h]
			JLE __BushTypePartlyBP
			MOV EDI, [ESP+04h]
__BushTypePartlyBP:
			(...)

Bytes

90 90

3B7C2404 7E04
8B7C2404
90 90

3B7C2404 7E04
8B7C2404
90 90

3B7C2404 7E04
8B7C2404
90 90

3B7C2404 7E04
8B7C2404

Segment 3/4

Offsets

RPG2000
2000-12-27
1.07
2017-09-14
1.62
00465DB2h
000651B2h
0046B6BEh
0006AABEh
RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00483E56h
00083256h
00483E56h
00083256h

Sourcecode

__BushTypePartlyLowerBP:
			CALL PROC__CalculateOpacity
			CALL PROC__OverwriteOpacity
			JMP __BushTypePartlyLowerBPNo
__BushTypePartlyNoCarry:
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
__BushTypePartlyLowerBPNo:
			(...)
__BushTypePartlyLowerBP:
			CALL PROC__CalculateOpacity
			CALL PROC__OverwriteOpacity
			JMP __BushTypePartlyLowerBPNo
__BushTypePartlyNoCarry:
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
__BushTypePartlyLowerBPNo:
			(...)
__BushTypePartlyLowerBP:
			CALL PROC__CalculateOpacity
			CALL PROC__OverwriteOpacity
			JMP __BushTypePartlyLowerBPNo
__BushTypePartlyNoCarry:
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
__BushTypePartlyLowerBPNo:
			(...)
__BushTypePartlyLowerBP:
			CALL PROC__CalculateOpacity
			CALL PROC__OverwriteOpacity
			JMP __BushTypePartlyLowerBPNo
__BushTypePartlyNoCarry:
			NOP
			NOP
			NOP
			NOP
			NOP
			NOP
__BushTypePartlyLowerBPNo:
			(...)

Bytes

E8B9000000
E8EC000000
EB06
90 90 90 90 90 90
E8B9000000
E8EC000000
EB06
90 90 90 90 90 90
E8B9000000
E8EC000000
EB06
90 90 90 90 90 90
E8B9000000
E8EC000000
EB06
90 90 90 90 90 90

Segment 4/4

Offsets

RPG2000
2000-12-27
1.07
2017-09-14
1.62
00465E88h
00065288h
0046B794h
0006AB94h
RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00483F2Ch
0008332Ch
00483F2Ch
0008332Ch

Sourcecode

PROC_VarBushLines:
			MOV EAX, DWORD PTR [EBP-2Ch]
			CALL PROC__0049024Ch			; TLcfgCharacter.GetGround
			MOV EDX, EAX
			MOV EAX, [0049ABA4h]			; TLcfgSystem
			MOV EAX, [EAX]
			ADD EDX, 1000				; BushLine Variables Base - 1
			CALL PROC__00469EE0h			; TLcfgSystem.GetVariable
			MOV EDI, EAX
			RET
			NOP
PROC_OverwriteOpacity:
			PUSH EDX
			PUSH EAX
			PUSH ECX
			MOV EAX, DWORD PTR [EBP-2Ch]
			CALL PROC__0049024Ch			; TLcfgCharacter.GetGround
			MOV EDX, EAX
			MOV EAX, [0049ABA4h]			; TLcfgSystem
			MOV EAX, [EAX]
			ADD EDX, 2000				; Opacity Variables Base - 1
			CALL PROC__00469EE0h			; TLcfgSystem.GetVariable
			XOR EDX, EDX
			POP ECX
			CDQ
			IMUL EAX, ECX
			MOV ECX, 255
			IDIV ECX
			POP EDX
			MOV DWORD PTR [EDX+614h], EAX
			MOV EAX, EDX
			POP EDX
			RET
PROC_VarBushLines:
			MOV EAX, DWORD PTR [EBP-2Ch]
			CALL PROC__00496FA4h			; TLcfgCharacter.GetGround
			MOV EDX, EAX
			MOV EAX, [004A0B8Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			ADD EDX, 1000				; BushLine Variables Base - 1
			CALL PROC__0046F7CCh			; TLcfgSystem.GetVariable
			MOV EDI, EAX
			RET
			NOP
PROC_OverwriteOpacity:
			PUSH EDX
			PUSH EAX
			PUSH ECX
			MOV EAX, DWORD PTR [EBP-2Ch]
			CALL PROC__00496FA4h			; TLcfgCharacter.GetGround
			MOV EDX, EAX
			MOV EAX, [004A0B8Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			ADD EDX, 2000				; Opacity Variables Base - 1
			CALL PROC__0046F7CCh			; TLcfgSystem.GetVariable
			XOR EDX, EDX
			POP ECX
			CDQ
			IMUL EAX, ECX
			MOV ECX, 255
			IDIV ECX
			POP EDX
			MOV DWORD PTR [EDX+614h], EAX
			MOV EAX, EDX
			POP EDX
			RET
PROC_VarBushLines:
			MOV EAX, DWORD PTR [EBP-2Ch]
			CALL PROC__004C48B4h			; TLcfgCharacter.GetGround
			MOV EDX, EAX
			MOV EAX, [004CDC7Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			ADD EDX, 1000				; BushLine Variables Base - 1
			CALL PROC__0048B398h			; TLcfgSystem.GetVariable
			MOV EDI, EAX
			RET
			NOP
PROC_OverwriteOpacity:
			PUSH EDX
			PUSH EAX
			PUSH ECX
			MOV EAX, DWORD PTR [EBP-2Ch]
			CALL PROC__004C48B4h			; TLcfgCharacter.GetGround
			MOV EDX, EAX
			MOV EAX, [004CDC7Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			ADD EDX, 2000				; Opacity Variables Base - 1
			CALL PROC__0048B398h			; TLcfgSystem.GetVariable
			XOR EDX, EDX
			POP ECX
			CDQ
			IMUL EAX, ECX
			MOV ECX, 255
			IDIV ECX
			POP EDX
			MOV DWORD PTR [EDX+614h], EAX
			MOV EAX, EDX
			POP EDX
			RET
PROC_VarBushLines:
			MOV EAX, DWORD PTR [EBP-2Ch]
			CALL PROC__004C14A8h			; TLcfgCharacter.GetGround
			MOV EDX, EAX
			MOV EAX, [004CDC7Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			ADD EDX, 1000				; BushLine Variables Base - 1
			CALL PROC__0048B354h			; TLcfgSystem.GetVariable
			MOV EDI, EAX
			RET
			NOP
PROC_OverwriteOpacity:
			PUSH EDX
			PUSH EAX
			PUSH ECX
			MOV EAX, DWORD PTR [EBP-2Ch]
			CALL PROC__004C14A8h			; TLcfgCharacter.GetGround
			MOV EDX, EAX
			MOV EAX, [004CDC7Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			ADD EDX, 2000				; Opacity Variables Base - 1
			CALL PROC__0048B354h			; TLcfgSystem.GetVariable
			XOR EDX, EDX
			POP ECX
			CDQ
			IMUL EAX, ECX
			MOV ECX, 255
			IDIV ECX
			POP EDX
			MOV DWORD PTR [EDX+614h], EAX
			MOV EAX, EDX
			POP EDX
			RET

Bytes

8B45D4 E8BCA30200
89C2 A1A4AB4900 8B00 81C2E8030000 E83C400000
89C7 C3 90

52 50 51 8B45D4 E899A30200
89C2 A1A4AB4900 8B00 81C2D0070000 E819400000
33D2 59 99 0FAFC1 B9FF000000 F7F9 5A 898214060000 89D0 5A C3
8B45D4 E808B80200
89C2 A18C0B4A00 8B00 81C2E8030000 E81C400000
89C7 C3 90

52 50 51 8B45D4 E8E5B70200
89C2 A18C0B4A00 8B00 81C2D0070000 E8F93F0000
33D2 59 99 0FAFC1 B9FF000000 F7F9 5A 898214060000 89D0 5A C3
8B45D4 E880090400
89C2 A17CDC4C00 8B00 81C2E8030000 E850740000
89C7 C3 90

52 50 51 8B45D4 E85D090400
89C2 A17CDC4C00 8B00 81C2D0070000 E82D740000
33D2 59 99 0FAFC1 B9FF000000 F7F9 5A 898214060000 89D0 5A C3
8B45D4 E874D50300
89C2 A17CDC4C00 8B00 81C2E8030000 E80C740000
89C7 C3 90

52 50 51 8B45D4 E851D50300
89C2 A17CDC4C00 8B00 81C2D0070000 E8E9730000
33D2 59 99 0FAFC1 B9FF000000 F7F9 5A 898214060000 89D0 5A C3