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

Post Reply 
Threaded Mode | Linear Mode
Исследование героев
» туториал(ы)
Author Message
igrik Offline
Administrators

Posts: 2807
Post: #646

Нет, DL:S тоже не помогает

ппц, не прошло и года с того момента, как мне нужна была эта функция


game bug fixes extended.dll || My Plugins || My GitHub
10.09.2015 22:24
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #647

(10.09.2015 18:41)igrik Wrote:  Как обновлять/перерисовывать диалог на лету я так и не разобрался
(17.07.2015 16:11)gamecreator Wrote:  Ну и не забыть перерисовать диалог:
hdlg->0x7299FD(-1
!!SN:E7510525/1/-1; вызывает у меня вылет, тут видимо я не так что-то понял
-> - это же thiscall, а слева от стрелки - this.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
11.09.2015 01:08
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #648

хех, клевое обозначение...
Но всё равно не работает. Скорее всего адрес не тот, либо нужны доп. параметры


game bug fixes extended.dll || My Plugins || My GitHub
11.09.2015 09:38
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #649

А можно пример кода и диалога? Потому что вникать что такое DL, если честно, сейчас не хочется.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
11.09.2015 11:53
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #650

Запаковано в виде мода. Скачать
Это диалоговое окно выбора режима битвы. Нападешь на монстра - появится это окно. На нажатие клавиши "7" происходит отрисовка диалога в других координатах. Клавиша "5" просто информация.


game bug fixes extended.dll || My Plugins || My GitHub
11.09.2015 12:22
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #651

А где вариант с thiscall, который не работает?


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
11.09.2015 15:11
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #652

там же. строка 054. Записана так:

upd, и да, я пробовал и так !!SN:E7510525/2/-1; результат тот же = вылет
а еще:


game bug fixes extended.dll || My Plugins || My GitHub
11.09.2015 15:17
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #653

Ну это я увидел. А где вариант с thiscall? Напоминаю:
Quote: E #1 / #2 / ... up to 62 parameters; Execute external function
#1 = function address
#2 = calling conversion

0 - Pascal (use for all Angel.dll functions)
1 - Cdecl or Stdcall (use for WinAPI and the majority of other functions)
2 - ThisCall (use it only if you know, what you are doing)
3 - FastCall (the same as above, try to avoid)
Первый аргумент - this (третий аргумент команды соответственно).
Что конкретно неясно?

К слову, исправил на thiscall и всё заработало. Только старое изображение диалога осталось, наверное надо экран перерисовать сперва.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
11.09.2015 15:24
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #654

я исправил на thiscall, и у меня не работало, ни тогда, ни сейчас.
Почему я и обратился к тебе за помощью. У меня вылетает, и перепробовал я все что только мог, в том числе и thiscall


game bug fixes extended.dll || My Plugins || My GitHub
11.09.2015 15:31
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #655

(11.09.2015 15:17)igrik Wrote:  upd, и да, я пробовал и так !!SN:E7510525/2/-1; результат тот же = вылет
а еще:
Теперь понятно. Поясняю: thiscall - это вызов метода объекта (если ты знаком с ООП). Функции такого типа принимают дополнительный параметр this, указатель на сам объект. Синтаксис вызова thiscall:
Смотрим в описание функции:
(17.07.2015 16:11)gamecreator Wrote:  hdlg->0x7299FD(-1)
Функция имеет один параметр, но в дополнение является методом объекта диалога. Значит нужно передать ей адрес этого объекта. Смотрим снова в описание, как же получить сам диалог, тоесть объект:
(17.07.2015 16:11)gamecreator Wrote:  Получить адрес диалога можно по номеру диалога:
hdlg = cdecl 0х729AD3(int32 id)
Или получить последний (текущий?) отображаемый диалог:
hdlg = [0x887650]

Понятно?


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
11.09.2015 15:36
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #656

йок-макарёк. Теперь понятно. Спасибо!!!

Quote:Теперь понятно. Поясняю: thiscall - это вызов метода объекта (если ты знаком с ООП). Функции такого типа принимают дополнительный параметр this, указатель на сам объект. Синтаксис вызова thiscall:
!!SN:Eфункция/2/this/параметры;
не знал. Получилось. Естественно осталось старое изображение диалога. Буду искать способы решения.


game bug fixes extended.dll || My Plugins || My GitHub
11.09.2015 15:39
Visit this user's website Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #657

(11.09.2015 15:39)igrik Wrote:  йок-макарёк.
ёк же?! не?
11.09.2015 16:16
Visit this user's website Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #658

да)))) :D


game bug fixes extended.dll || My Plugins || My GitHub
11.09.2015 16:25
Visit this user's website Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #659

gamecreator | feanor, подскажите плиз:
что такое "mip = int a4" и как его получить. Вообще въехать не могу блин!
Code:
0х00408ABF Enter2ObjectGamer(v2, a5, mip);
0х00408ABF car__thiscall Enter2ObjectGamer(int AdvManager, signed int a3, int a4)

и аналогичный вопрос по "__int64 PosMixed"
Code:
0x004A8160 void __thiscall Enter2ObjectMain(int AvdManager, _Hero_ *Hero, signed int Par1, __int64 PosMixed)


game bug fixes extended.dll || My Plugins || My GitHub
23.10.2015 18:57
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #660

А, это. Это координаты.
Code:
inline int PackCoords(int x, int y, int l)
{
    return (x & 0x3FF) + ((y & 0x3FF) << 16) + ((l & 0xF) << 26);
}

inline void UnpackCoords(int coords, int& x, int& y, int& l)
{
    x = coords & 0x3FF;
    y = (coords >> 16) & 0x3FF;
    l = (coords >> 26) & 0xF;
}

Почему они у тебя внезапно int64 - не знаю.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
23.10.2015 19:34
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