I found moving the full *solar.wdf table was problematic to say the least. screen would not destroy properly.
So I had to take a different approach for adding new build queue widgets. The original 4 slots add from the table at 595DA8 as normal
the new 4 slots add from new table at 68a320. this table only has those 4 slots.
At 4F8BF1 it starts to load the *solar.wdf table (34 widgets) when that completes I added new code to add the 4 new slots from 68a320
so far this method is reacting the same as before, see image above. and they try to display new widgets when forced with cmp 8.
I hope since all the widget id's are in order (+4) they will be selected properly. but we will not know until all the code has been changed
28 02, 2c 02, 30 02, 34 02, 38 02, 3C 02, 40 02, 44 02
Spocks-cuddly-tribble wrote: ↑Fri Apr 23, 2021 10:34 am
If there is hundreds subs like this you are going to have a lot of fun....
Just a few I may need to look at for +60h, +64h and +68h
Code: Select all
00447035 C7 81 A8 00 00 00 00 00 00 00 mov [dword ptr ecx+0A8h], 0
0044703F C7 41 54 00 00 00 00 mov [dword ptr ecx+54h], 0
00447046 C7 41 58 00 00 00 00 mov [dword ptr ecx+58h], 0
0044704D C7 41 5C 00 00 00 00 mov [dword ptr ecx+5Ch], 0
00447054 C7 41 60 00 00 00 00 mov [dword ptr ecx+60h], 0
0044705B C7 41 64 00 00 00 00 mov [dword ptr ecx+64h], 0
00447062 BB 14 00 00 00 mov ebx, 14h ; num
0044D005 8B 40 68 mov eax, [eax+68h]
0044D025 89 50 68 mov [eax+68h], edx
0044D04B 83 C7 60 add edi, 60h
0044D376 C7 43 64 01 00 00 00 mov [dword ptr ebx+64h], 1
0044D37D 89 43 60 mov [ebx+60h], eax
0044D380 89 D8 mov eax, ebx
0044D382 8D 53 60 lea edx, [ebx+60h]
0044D7DC C7 42 60 00 00 00 00 mov [dword ptr edx+60h], 0
0044D7E3 89 D0 mov eax, edx
0044D7E5 C7 42 64 01 00 00 00 mov [dword ptr edx+64h], 1
0044D7EC 83 C2 60 add edx, 60h
0044D84B 8B 53 60 mov edx, [ebx+60h]
0044D870 C7 43 60 01 00 00 00 mov [dword ptr ebx+60h], 1
0044D877 B8 01 00 00 00 mov eax, 1
0044D87C C7 43 64 01 00 00 00 mov [dword ptr ebx+64h], 1
0044D8D5 8B 53 60 mov edx, [ebx+60h]
0044D905 FF 43 60 inc [dword ptr ebx+60h]
0044D908 B8 01 00 00 00 mov eax, 1
0044D90D C7 43 64 01 00 00 00 mov [dword ptr ebx+64h], 1
0044D8BB C7 43 64 01 00 00 00 mov [dword ptr ebx+64h], 1
0044DA06 83 7E 60 00 cmp [dword ptr esi+60h], 0
0044DA10 3B 4E 60 cmp ecx, [esi+60h]
0044DB33 C7 46 64 01 00 00 00 mov [dword ptr esi+64h], 1
0044DB1D FF 4E 60 dec [dword ptr esi+60h]
0044DB20 C7 46 64 01 00 00 00 mov [dword ptr esi+64h], 1
0044DA71 8B 56 60 mov edx, [esi+60h]
0044DA74 4A dec edx
0044DA75 8D 04 95 00 00 00 00 lea eax, [ds:0+edx*4]
0044DA7C 29 D0 sub eax, edx
0044DA7E C7 44 C6 14 00 00 00 00 mov [dword ptr esi+eax*8+14h], 0
0044DA86 8B 46 60 mov eax, [esi+60h]
0044DA89 8D 50 FF lea edx, [eax-1]
0044DA8C 8D 04 95 00 00 00 00 lea eax, [ds:0+edx*4]
0044DA93 29 D0 sub eax, edx
0044DA95 C7 04 C6 00 00 00 00 mov [dword ptr esi+eax*8], 0
0044DA9C FF 4E 60 dec [dword ptr esi+60h]
0044DA9F C7 46 64 01 00 00 00 mov [dword ptr esi+64h], 1
0044DB5A 8B 42 60 mov eax, [edx+60h]
0044DB88 83 79 60 00 cmp [dword ptr ecx+60h], 0
0044DB98 8B 71 60 mov esi, [ecx+60h]
0044DB9B C7 41 68 00 00 00 00 mov [dword ptr ecx+68h], 0
0044DC12 FF 49 60 dec [dword ptr ecx+60h]
0044DC15 5E pop esi
0044DC16 C7 41 64 01 00 00 00 mov [dword ptr ecx+64h], 1
0044DBC0 8B 41 60 mov eax, [ecx+60h]
0044DBC3 8D 50 FF lea edx, [eax-1]
0044DBC6 8D 04 95 00 00 00 00 lea eax, [ds:0+edx*4]
0044DBCD 29 D0 sub eax, edx
0044DBCF C7 44 C1 14 00 00 00 00 mov [dword ptr ecx+eax*8+14h], 0
0044DBD7 8B 41 60 mov eax, [ecx+60h]
0044DBDA 8D 50 FF lea edx, [eax-1]
0044DBDD 8D 04 95 00 00 00 00 lea eax, [ds:0+edx*4]
0044DBE4 29 D0 sub eax, edx
0044DBE6 C7 04 C1 00 00 00 00 mov [dword ptr ecx+eax*8], 0
0044DBED FF 49 60 dec [dword ptr ecx+60h]
0044DBF1 C7 41 64 01 00 00 00 mov [dword ptr ecx+64h], 1
0044DC4C 83 7A 60 04 cmp [dword ptr edx+60h], 4
0044DC85 83 78 60 00 cmp [dword ptr eax+60h], 0
0044DD4E C7 41 60 00 00 00 00 mov [dword ptr ecx+60h], 0
0044DD55 C7 41 64 01 00 00 00 mov [dword ptr ecx+64h], 1
0044DD5C 89 C8 mov eax, ecx
0044DD5E C7 41 68 00 00 00 00 mov [dword ptr ecx+68h], 0
0044DD65 8D 51 60 lea edx, [ecx+60h]
My list for 6ch is much shorter and many may not be needed, but wanted to keep track
Code: Select all
00437F49 83 C0 6C add eax, 6Ch
0044D51F B9 6C 00 00 00 mov ecx, 6Ch
0044D537 83 E9 6C sub ecx, 6Ch
0044D53A 83 C5 6C add ebp, 6Ch
0044D6DB B9 6C 00 00 00 mov ecx, 6Ch
0044D6F7 8D 77 6C lea esi, [edi+6Ch]
0044DD34 B8 6C 00 00 00 mov eax, 6Ch
0044DD39 BB 6C 00 00 00 mov ebx, 6Ch
0043777A 66 8B 71 6C mov si, [ecx+6Ch]
004378BD B9 6C 00 00 00 mov ecx, 6Ch
004378DB 83 C0 6C add eax, 6Ch
004378DE 83 C5 6C add ebp, 6Ch
004379CC 66 8B 4A 6C mov cx, [edx+6Ch]
00437AFF 66 8B 7F 6C mov di, [edi+6Ch]
00437BFB B9 6C 00 00 00 mov ecx, 6Ch
00437C18 83 C3 6C add ebx, 6Ch
0043A96D 8B 4A 6C mov ecx, [edx+6Ch]
that is a lot of locations