(05.12.2023 03:37)Archer30 Wrote: thanks. Could you tell me what UN:C should be used to obtain the real town number? We don't have access to the Russian Erm help.
На Си - одна строчка кода:
Code:
GetTownsCount() {return ((_int_)((*(_dword_*)(((_ptr_)this) + 0x21618) - *(_dword_*)(((_ptr_)this) + 0x21614)) / 360));}
На вого-ассемблерной вставке так:
Code:
int GetCastleMapCount(void)
{
STARTNA(__LINE__, 0)
_CastleSetup_ *strt,*end;
__asm{
mov eax,BASE
mov ecx,[eax]
add ecx,0x21614
mov eax,[ecx]
mov strt,eax
mov eax,[ecx+4]
mov end,eax
}
RETURN((end-strt)/360)
}
На ERM2 это как-то тоже можно написать...