VarTextWidthPatch

Changes text-display to use an individual width value for each ANSI-character (only one list for all fonts), baked into a 256 bytes array inside CODE-section. See segment #1 for default data, ANSI 0x01 is the engine's placeholder-byte for half-spaces and set to 3 pixels, everything after it to 6, just like vanilla.

Originally made and first released by Cherry.

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

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00425C00h
00025000h
00425C00h
00025000h

Sourcecode

			db 0, 3, 6[254]
			db 0, 3, 6[254]

Bytes

00 03 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
00 03 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06

Segment 2/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00425D00h
00025100h
00425D00h
00025100h

Sourcecode

PROC__00425D00h:
			MOV EDX, EAX
			XOR EAX, EAX
			TEST EDX, EDX
			JZ __00425D35h
			MOVZX ECX, BYTE PTR [EDX]
			TEST CL, CL
			JZ __00425D35h
			CMP CL, 36
			JZ __00425D36h
__00425D20h:
			MOVZX ECX, BYTE PTR [ECX+00425C00h]
			ADD EAX, ECX
			INC EDX
			MOVZX ECX, BYTE PTR [EDX]
			TEST CL, CL
			JNZ __0425D20h
__00425D35h:
			RET
__00425D36h:
			MOV EAX, DWORD PTR [00425C24h]
			MOV CL, BYTE PTR [EDX+01h]
			TEST CL, CL
			JZ __00425D35h
			CMP CL, 36
			JZ __00425D35h
			MOV EAX, 12
			RET
__00425D55h:
			MOVZX EAX, BYTE PTR [00425C01h]
			ADD [EBP-0Ch], EAX
			JMP __0048965Fh
PROC__00425D00h:
			MOV EDX, EAX
			XOR EAX, EAX
			TEST EDX, EDX
			JZ __00425D25h
			MOVZX ECX, BYTE PTR [EDX]
			TEST CL, CL
			JZ __00425D25h
			CMP CL, 36
			JZ __00425D26h
__00425D14h:
			MOVZX ECX, BYTE PTR [ECX+00425C00h]
			ADD EAX, ECX
			INC EDX
			MOVZX ECX, BYTE PTR [EDX]
			TEST CL, CL
			JNZ __0425D14h
__00425D25h:
			RET
__00425D26h:
			MOV EAX, DWORD PTR [00425C24h]
			MOV CL, BYTE PTR [EDX+01h]
			TEST CL, CL
			JZ __00425D25h
			CMP CL, 36
			JZ __00425D25h
			MOV EAX, 12
			RET
__00425D3Dh:
			MOVZX EAX, BYTE PTR [00425C01h]
			ADD [EBP-0Ch], EAX
			JMP __0048961Bh
			NOP
			NOP

Bytes

8BD0 33C0 85D2 0F8429000000
0FB60A 84C9 0F841E000000
80F924 0F8416000000
0FB689005C4200 03C1 42 0FB60A 84C9 0F85EBFFFFFF
C3

A1245C4200 8A4A01 84C9 0F84EFFFFFFF
80F924 0F84E6FFFFFF
B80C000000 C3

0FB605015C4200 0145F4 E9FB380600
8BD0 33C0 85D2 741D
0FB60A 84C9 7416
80F924 7412
0FB689005C4200 03C1 42 0FB60A 84C9 75EF
C3

A1245C4200 8A4A01 84C9 74F3
80F924 74EE
B80C000000 C3

0FB605015C4200 0145F4 E9CF380600
90 90

Segment 3/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
0048820Ah
0008760Ah
004881C6h
000875C6h

Sourcecode

			MOV EDX, 32
			MOV EDX, 32

Bytes

BA20000000
BA20000000

Segment 4/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00489391h
00088791h
0048934Dh
0008874Dh

Sourcecode

			JMP __00425D55h
			NOP
			NOP
			NOP
			NOP
			JMP __00425D3Dh
			NOP
			NOP
			NOP
			NOP

Bytes

E9BFC9F9FF
90 90 90 90
E9EBC9F9FF
90 90 90 90

Segment 5/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00489535h
00088935h
004894F1h
000888F1h

Sourcecode

			CALL PROC__00425D00h
			NOP
			NOP
			NOP
			NOP
			NOP
			CALL PROC__00425D00h
			JMP __0048953Fh
			NOP
			NOP
			NOP
__0048953Fh:
			(...)

Bytes

E8C6C7F9FF
90 90 90 90 90
E80AC8F9FF
EB03
90 90 90

Segment 6/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00489555h
00088955h
00489511h
00088911h

Sourcecode

			CALL PROC__00425D00h
			NOP
			NOP
			NOP
			NOP
			NOP
			CALL PROC__00425D00h
			JMP __0048955Fh
			NOP
			NOP
			NOP
_0048955Fh:
			(...)

Bytes

E8A6C7F9FF
90 90 90 90 90
E8EAC7F9FF
EB03
90 90 90

Segment 7/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
0048962Bh
00088A2Bh
004895E7h
000889E7h

Sourcecode

			MOV DL, BYTE PTR [EDX]
			NOP
			MOV DL, BYTE PTR [EDX]
			NOP

Bytes

8A12 90
8A12 90

Segment 8/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00489635h
00088A35h
004895F1h
000889F1h

Sourcecode

			CMP EAX, 32
			CMP EAX, 32

Bytes

83F820
83F820

Segment 9/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00489652h
00088A52h
0048960Eh
00088A0Eh

Sourcecode

			CALL PROC__0425D00h
			NOP
			NOP
			NOP
			NOP
			NOP
			CALL PROC__00425D00h
			JMP __0048965Ch
			NOP
			NOP
			NOP
_0048965Ch:
			(...)

Bytes

E8A9C6F9FF
90 90 90 90 90
E8EDC6F9FF
EB03
90 90 90

Segment 10/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
004C6EEDh
000C62EDh
004C6221h
000C5621h

Sourcecode

			CALL PROC__00425D00h
			MOV ECX, EAX
			NOP
			NOP
			NOP
			NOP
			NOP
			CALL PROC__00425D00h
			MOV ECX, EAX
			JMP __004C622Dh
			NOP
			NOP
			NOP
__004C622Dh:
			(...)

Bytes

E80EEEF5FF
8BC8 90 90 90 90 90
E8DAFAF5FF
8BC8 EB03
90 90 90

Segment 11/11

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
004C8056h
000C7456h
004C738Ah
000C678Ah

Sourcecode

			CALL PROC__00425D00h
			NOP
			NOP
			NOP
			NOP
			NOP
			ADD DWORD PTR [ESI+88h], EAX
			77 NOPs
			CALL PROC__00425D00h
			JMP __004C7394h
			NOP
			NOP
			NOP
__004C7394h:
			ADD DWORD PTR [ESI+88h], EAX
			JMP __004C73E7h
			75 NOPS
__004C73E7h:
			(...)

Bytes

E8A5DCF5FF
90 90 90 90 90 018688000000
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90
E871E9F5FF
EB03
90 90 90 018688000000 EB4B
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90