[Help] Research on ItemToolTipTEXT.bmd with a maximum number of rows exceeding 512
I want to comment on some new equipment, but the ItemToolTipTEXT. BMD file of S803 is full and cannot be added. So I want to use S902's ItemToolTipTEXT. BMD and 902's ItemToolTipTEXT. BMD to support 800 rows.
First of all, I skipped the verification of ItemToolTipTEXT.bmd to make it error-free. The assembly location is as follows:
007CE84D 3945 F8 cmp dword ptr ss:[ebp-0x8],eax
007CE850 EB 55 jmp short main.007CE8A7 // JMP ERROR
007CE852 FF75 08 push dword ptr ss:[ebp+0x8] ; ntdll_15.774F2100
007CE855 68 98D10101 push main.0101D198 ; ASCII "%s - File corrupted."
Then, modify the maximum number of read rows of ItemToolTipTEXT.bmd to 800, the assembly location is as follows:
007CE8B9 8B85 E8FEFFFF mov eax,dword ptr ss:[ebp-0x118]
007CE8BF 40 inc eax
007CE8C0 8985 E8FEFFFF mov dword ptr ss:[ebp-0x118],eax
007CE8C6 81BD E8FEFFFF 0>cmp dword ptr ss:[ebp-0x118],0x200 // change 200 to 320
007CE8D0 7D 00 jge short main.007CE8D2
007CE8D2 FF75 F0 push dword ptr ss:[ebp-0x10]
007CE8D5 FFB5 ECFEFFFF push dword ptr ss:[ebp-0x114]
007CE8DB E8 BBCCC6FF call main.0043B59B
When I modify 200 to 320 saves, running MAIN. exe will crash MAIN. EXE crash, I don't know who can solve this problem.
Re: Research on ItemToolTipTEXT.bmd with a maximum number of rows exceeding 512 rows
You forgot to change memory allocation size, as i remember it looks like:
...
struct TooltipTextInfo {
unsigned short Index;
char Text[256];
short Type;
};
TooltipTextInfo* buffer = new TooltipTextInfo[<count>]; // here you need also change allocation size to that you wish
fread(buffer, sizeof(TooltipTextInfo) * <count>, 1, file_stream);
...
Also i do not remember which container uses this class for store end-point tooltip information, if you have get luck - it will be STL vector or map, but if it is static array with const size - you need patch it too, but allocate additional size from your dll, in this way it will be not so easy work.
P.S.: better use help section for questions like this