Объявления
Поздравляем
VDV_forever


Друзья, если не получается зарегистрироваться, напишите на почту vdv_forever@bk.ru.
Я оторву свою задницу от всех дел и обязательно Вас активирую! :smile10:
Добро пожаловать на геройский форум! :smile25:

H3API by RoseKavalier

Герои Меча и Магии III: Возрождение Эрафии, Герои Меча и Магии III Дыхание Смерти, Герои Меча и Магии III Клинок Армагеддона, Герои Меча и Магии III Хроники Героев
offlineRoseKavalier  
Мастер
Мастер
 
Сообщения: 331
Зарегистрирован: 23 сен 2017, 17:00
Пол: Не указан
Поблагодарили: 234 раз.

Re: H3API by RoseKavalier

Сообщение RoseKavalier » 28 июн 2020, 17:29

Have you considered sfx?

If you want something nicer there's InnoSetup which HDmod and Hota also use.
Вернуться к началу

offlineАватара пользователя
AlexSpl  
имя: Александр
Эксперт
Эксперт
 
Сообщения: 5540
Зарегистрирован: 17 сен 2010, 12:58
Пол: Мужчина
Награды: 14
Высшая медаль (1) Победителю турнира по HMM1_TE (2) Победителю этапа по HMM1 (1) Победителю этапа по HMM2 (1) Лучшему из лучших (1) 2 место 1 этапа по HMM1 (1)
3 место 1 этапа по HMM1 (1) 1 место 2 этапа по HMM2 (1) Победителю турнира по KB (2) Победителю турнира по KB (1) Грандмастер оффлайн-турниров (1) Боевой шлем (1)
Поблагодарили: 2155 раз.

Re: H3API by RoseKavalier

Сообщение AlexSpl » 30 июн 2020, 15:36

2RoseKavalier: I'm talking about a message queue. There is a message loop in the game. How can I put a message into the queue, so that it could be handled by it (SendEventMsg from homm3.h doesn't seem to work properly)?
Вернуться к началу

offlineRoseKavalier  
Мастер
Мастер
 
Сообщения: 331
Зарегистрирован: 23 сен 2017, 17:00
Пол: Не указан
Поблагодарили: 234 раз.

Re: H3API by RoseKavalier

Сообщение RoseKavalier » 30 июн 2020, 22:15

I have not studied this, usually I just hook whichever dialog loop is needed and feed it the H3Msg directly. It would be a good addition of course, I can't look right now however.
Вернуться к началу

offlineas239  
имя: Анатолий
Ветеран
Ветеран
 
Сообщения: 527
Зарегистрирован: 29 дек 2018, 14:17
Пол: Мужчина
Поблагодарили: 38 раз.

Re: H3API by RoseKavalier

Сообщение as239 » 30 авг 2020, 08:23

1. How to convert this to H3API?
Код: Выделить всё
tm->dlg->GetItem(30720)->SetEnabled(false);


"H3TownManager" doesn't have something like "dlg" at offset 280.

2. And how to convert this?
Код: Выделить всё
string str = (char*)c->ecx; // Оригинальное сообщение
   str = str + "\n\nAmount: {" + getInterval(CreaturesCount)+"}";


How to get type "string"?
"H3String" doesn't work with second string.
Вернуться к началу

offlineRoseKavalier  
Мастер
Мастер
 
Сообщения: 331
Зарегистрирован: 23 сен 2017, 17:00
Пол: Не указан
Поблагодарили: 234 раз.

Re: H3API by RoseKavalier

Сообщение RoseKavalier » 30 авг 2020, 13:44

1. It does, I decided to place H3API in its own repository so it's easier for me to update it exclusively. The version on H3Plugins has not been updated for several months.

2. Updating H3API would probably do the trick, I fixed some things a while back. Worst case, use H3String::Printf() or H3String::PrintfAppend()
Вернуться к началу

offlineas239  
имя: Анатолий
Ветеран
Ветеран
 
Сообщения: 527
Зарегистрирован: 29 дек 2018, 14:17
Пол: Мужчина
Поблагодарили: 38 раз.

Re: H3API by RoseKavalier

Сообщение as239 » 20 сен 2020, 11:35

RoseKavalier писал(а):

 
Изображение
Изображение


I have not natvis type:
 
Изображение

VS2013.
Вернуться к началу

offlineas239  
имя: Анатолий
Ветеран
Ветеран
 
Сообщения: 527
Зарегистрирован: 29 дек 2018, 14:17
Пол: Мужчина
Поблагодарили: 38 раз.

Re: H3API by RoseKavalier

Сообщение as239 » 25 сен 2020, 08:29

The stupidest question, but I don't understand what needs to be done.
I want to go to the actual headers.
Downloaded H3API.
Сopied the folder.
Wrote:
 
Изображение

But the patcher won't work, what's wrong?
 
Изображение
Последний раз редактировалось as239 28 сен 2020, 07:44, всего редактировалось 1 раз.
Вернуться к началу

offlineas239  
имя: Анатолий
Ветеран
Ветеран
 
Сообщения: 527
Зарегистрирован: 29 дек 2018, 14:17
Пол: Мужчина
Поблагодарили: 38 раз.

Re: H3API by RoseKavalier

Сообщение as239 » 25 сен 2020, 10:51

Figured out, added to "H3API.hpp":
Код: Выделить всё
#define _H3API_PATCHER_X86_


But now I have the following errors:
 
1>------ Build started: Project: FreshMod, Configuration: Debug Win32 ------
1> dllmain.cpp
1>c:\games\freshmod\h3api-master\include\h3api\h3set\h3set.hpp(48): error C2864: 'h3::H3Set<T,NilNode>::_Nil' : a static data member with an in-class initializer must have non-volatile const integral type
1> type is 'const h3::H3Set<T,NilNode>::Node **'
1> c:\games\freshmod\h3api-master\include\h3api\h3set\h3set.hpp(92) : see reference to class template instantiation 'h3::H3Set<T,NilNode>' being compiled
1>c:\games\freshmod\h3api-master\include\h3api\h3set\h3set.hpp(48): error C2864: 'h3::H3Set<h3unk,0>::_Nil' : a static data member with an in-class initializer must have non-volatile const integral type
1> type is 'const h3::H3Set<h3unk,0>::Node **'
1> c:\games\freshmod\h3api-master\include\h3api\h3set\h3set.hpp(93) : see reference to class template instantiation 'h3::H3Set<h3unk,0>' being compiled
1>c:\games\freshmod\h3api-master\include\h3api\h3set\h3set.hpp(48): error C2864: 'h3::H3Set<h3::H3ResourceItemData,6940164>::_Nil' : a static data member with an in-class initializer must have non-volatile const integral type
1> type is 'const h3::H3Set<h3::H3ResourceItemData,6940164>::Node **'
1> c:\games\freshmod\h3api-master\include\h3api\h3binaryitems\h3binaryitems.hpp(710) : see reference to class template instantiation 'h3::H3Set<h3::H3ResourceItemData,6940164>' being compiled
1>c:\games\freshmod\h3api-master\include\h3api\h3binaryitems\h3binaryitems.hpp(889): error C2620: 'h3::H3BasePalette565::color' : illegal union member; type 'h3::H3RGB565' has a user-defined constructor or non-trivial default constructor
1>c:\games\freshmod\h3api-master\include\h3api\h3binaryitems\h3binaryitems.cpp(3486): error C2065: 'color' : undeclared identifier
1>c:\games\freshmod\h3api-master\include\h3api\h3binaryitems\h3binaryitems.cpp(3516): error C2065: 'color' : undeclared identifier
1>c:\games\freshmod\h3api-master\include\h3api\h3binaryitems\h3binaryitems.cpp(3520): error C2065: 'color' : undeclared identifier
1>c:\games\freshmod\h3api-master\include\h3api\h3stream\h3stream.cpp(204): error C3861: 'CanWrite': identifier not found
1>c:\games\freshmod\h3api-master\include\h3api\h3stream\h3stream.cpp(220): error C3861: 'WriteNewLine': identifier not found
1>c:\games\freshmod\h3api-master\include\h3api\h3exception\h3exception.cpp(184): warning C4535: calling _set_se_translator() requires /EHa
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Вернуться к началу

offlineRoseKavalier  
Мастер
Мастер
 
Сообщения: 331
Зарегистрирован: 23 сен 2017, 17:00
Пол: Не указан
Поблагодарили: 234 раз.

Re: H3API by RoseKavalier

Сообщение RoseKavalier » 26 сен 2020, 06:15

NATVIS: no idea, I included a base version which you should be able to simply include in your project.

The H3Set header was imported from the maped api (still in development), I failed to test it with pre-2015 visual studio (I mostly use VS2019 nowadays to code) as that api requires c++11. I will check at some point...

::color things is probably the unnamed union, I forgot to check when that was added to the standard. I'll check with an older compiler when I get time.

`CanWrite` and `WriteNewLine` are a failed renames, it should be `canWrite` and 'writeNewLine`.

_set_set_translator(): yikes, I forgot to do basic check for _H3API_EXCEPTION_ ! To be fixed...
In the meantime you can set the /EHa flag here:
Properties > Configuration Properties > C/C++ > Code Generation > Enable C++ Exceptions and use the `Yes with SEH Exceptions (/EHa)` option.

Sorry no ETA on fixing this except the failed renames which I can do in a few days.
Вернуться к началу

offlineas239  
имя: Анатолий
Ветеран
Ветеран
 
Сообщения: 527
Зарегистрирован: 29 дек 2018, 14:17
Пол: Мужчина
Поблагодарили: 38 раз.

Re: H3API by RoseKavalier

Сообщение as239 » 28 сен 2020, 07:11

Thanks for the answer.
I was able to switch to vs 2019 because completely abandoned homm3.h.
With it, errors came out, that went away after disabling the alignment of structures.

How to fix this errors?
1. H3MsgCustom
 
Изображение


2. H3Streambuf
 
Изображение


3. NH3Constants
 
Изображение


4. _Mgr_
 
Изображение
Вернуться к началу

Пред.След.

Вернуться в Общий раздел

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 4

cron