Assigning on_* events(C++ Engine SDK)

Posted By: Quad

Assigning on_* events(C++ Engine SDK) - 08/10/16 23:43

Hello,

I am trying to assign some ev->on_* using the engine SDK. They seem to be simple EVENT pointers, which i tried to assign functions by casting their pointers to EVENT*, which compiles and runs fine with no crashes whatsoever but the events do not trigger.

Particular events i am trying to assign are on_resize on_d3dreset on_d3dlost.

Anyone point me in right direction?
Posted By: Ch40zzC0d3r

Re: Assigning on_* events(C++ Engine SDK) - 08/11/16 00:00

Code:
*ev->on_anykey = (EVENT)hkOnKeyAny;

Posted By: Quad

Re: Assigning on_* events(C++ Engine SDK) - 08/11/16 00:40

tried that too still on_resize and on_1 etc still not firing.

Okay dammit, i forgot managed the message loop myself.
Posted By: Ch40zzC0d3r

Re: Assigning on_* events(C++ Engine SDK) - 08/11/16 01:01

If those events dont work you can simply hook the directx function.
Its called Reset() and its vtable index is 16
Posted By: Quad

Re: Assigning on_* events(C++ Engine SDK) - 08/11/16 08:58

I added video_set to WM_SIZE handler and added original engine message loop to the end of my custom one and use on_d3d* messages. It kind of works fine except i have to find a way to determine when to handle the input on my own or let the engine handle it.
© 2024 lite-C Forums