BattleEndBugFix

Close a bunch of windows that may still be open when battle is ending. The normal behaviour is directly borrowed from how Hiroyuki Itou's original ATB is working, so it can't be considered a bug.

Originally made and first released by bugmenot.

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

Offsets

RPG2003
1.001.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00446DCCh
000461CCh
00446DACh
000461ACh
00446EB0h
000462B0h
00446EB0h
000462B0h
00446EB0h
000462B0h

Sourcecode

PROC__00446DCCh:
			PUSH EBX
			PUSH ESI
			MOV EAX, [004C2E68h]
			MOV EAX, [EAX]
			XCHG EBX, EAX
			PUSH 36
			POP ESI
__00446DD9h:
			MOV EAX, [EBX+ESI]
			MOV EDX, [EAX]
			CALL [EDX+28h]
			ADD ESI, 4
			CMP ESI, 68
			JNE __00446DD9h
			POP ESI
			POP EBX
			MOV EAX, [004C2DACh]
			RET
PROC__00446DACh:
			PUSH EBX
			PUSH ESI
			MOV EAX, [004C5B50h]
			MOV EAX, [EAX]
			XCHG EBX, EAX
			PUSH 36
			POP ESI
__00446DB9h:
			MOV EAX, [EBX+ESI]
			MOV EDX, [EAX]
			CALL [EDX+28h]
			ADD ESI, 4
			CMP ESI, 68
			JNE __00446DB9h
			POP ESI
			POP EBX
			MOV EAX, [004C5A94h]
			RET
PROC__00446EB0h:
			PUSH EBX
			PUSH ESI
			MOV EAX, [004CCD38h]
			MOV EAX, [EAX]
			XCHG EBX, EAX
			PUSH 36
			POP ESI
__00446EBDh:
			MOV EAX, [EBX+ESI]
			MOV EDX, [EAX]
			CALL [EDX+28h]
			ADD ESI, 4
			CMP ESI, 68
			JNE __00446EBDh
			POP ESI
			POP EBX
			MOV EAX, [004CCC7Ch]
			RET
PROC__00446EB0h:
			PUSH EBX
			PUSH ESI
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			XCHG EBX, EAX
			PUSH 36
			POP ESI
__00446EBDh:
			MOV EAX, [EBX+ESI]
			MOV EDX, [EAX]
			CALL [EDX+28h]
			ADD ESI, 4
			CMP ESI, 68
			JNE __00446EBDh
			POP ESI
			POP EBX
			MOV EAX, [004CDC7Ch]
			RET
PROC__00446EB0h:
			PUSH EBX
			PUSH ESI
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			XCHG EBX, EAX
			PUSH 36
			POP ESI
__00446EBDh:
			MOV EAX, [EBX+ESI]
			MOV EDX, [EAX]
			CALL [EDX+28h]
			ADD ESI, 4
			CMP ESI, 68
			JNE __00446EBDh
			POP ESI
			POP EBX
			MOV EAX, [004CDC7Ch]
			RET

Bytes

53 56 A1682E4C00 8B00 93 6A24 5E 8B0433 8B10 FF5228 83C604 83FE44 75F0
5E 5B A1AC2D4C00 C3
53 56 A1505B4C00 8B00 93 6A24 5E 8B0433 8B10 FF5228 83C604 83FE44 75F0
5E 5B A1945A4C00 C3
53 56 A138CD4C00 8B00 93 6A24 5E 8B0433 8B10 FF5228 83C604 83FE44 75F0
5E 5B A17CCC4C00 C3
53 56 A138DD4C00 8B00 93 6A24 5E 8B0433 8B10 FF5228 83C604 83FE44 75F0
5E 5B A17CDC4C00 C3
53 56 A138DD4C00 8B00 93 6A24 5E 8B0433 8B10 FF5228 83C604 83FE44 75F0
5E 5B A17CDC4C00 C3

Segment 2/3

Offsets

RPG2003
1.001.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00492132h
00091532h
004946BEh
00093ABEh
0049894Ah
00097D4Ah
004999FEh
00098DFEh
00498BF2h
00097FF2h

Sourcecode

			CALL PROC__00446DCCh
			CALL PROC__00446DACh
			CALL PROC__00446EB0h
			CALL PROC__00446EB0h
			CALL PROC__00446EB0h

Bytes

E8954CFBFF
E8E926FBFF
E861E5FAFF
E8ADD4FAFF
E8B9E2FAFF

Segment 3/3

Offsets

RPG2003
1.001.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
004924CDh
000918CDh
00494A61h
00093E61h
00498CEDh
000980EDh
00499DA1h
000991A1h
00498F95h
00098395h

Sourcecode

			CALL PROC__00446DCCh
			CALL PROC__00446DACh
			CALL PROC__00446EB0h
			CALL PROC__00446EB0h
			CALL PROC__00446EB0h

Bytes

E8FA48FBFF
E84623FBFF
E8BEE1FAFF
E80AD1FAFF
E816DFFAFF