Current time: 23.03.2024, 08:41 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
ERA III
Author Message
gamemaster Offline

Posts: 14
Post: #2536

@Berserker

Minor issue.

We should align parameter type 'VersionLine' in 'ReportPluginVersion' method. In GameExt.pas type is string and in Extern.pas it is pchar.
Exported version use pchar and it is already used in few plugins.
Maybe we can use explicit cast in GameExt to avoid confusion and keep parameter types as pchar.

https://github.com/ethernidee/era/blob/3...t.pas#L156
https://github.com/ethernidee/era/blob/3...n.pas#L242
17.01.2024 14:57
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #2537

gamemaster, all exported functions use pchar (const char*) type for string. Automatic conversion is performed by Delphi when passing pchar to functions, expecting AnsiString/WideString, etc. I see no issue here. Am I wrong?

procedure ShowMessage (Mes: pchar); stdcall;
function Ask (Question: pchar): TDwordBool; stdcall;


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
17.01.2024 16:25
Find all posts by this user Quote this message in a reply
gamemaster Offline

Posts: 14
Post: #2538

I did not check other exported methods. If same principle is used at other places then it is ok to leave it as-is.
There is no issue with current implementation.
17.01.2024 18:30
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group