Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, AndrewAMD), 385 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Assigning on_* events(C++ Engine SDK) #461550
08/10/16 23:43
08/10/16 23:43
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Online OP
Senior Expert
Quad  Online OP
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
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?


3333333333
Re: Assigning on_* events(C++ Engine SDK) [Re: Quad] #461551
08/11/16 00:00
08/11/16 00:00
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Code:
*ev->on_anykey = (EVENT)hkOnKeyAny;


Last edited by Ch40zzC0d3r; 08/11/16 00:07.
Re: Assigning on_* events(C++ Engine SDK) [Re: Ch40zzC0d3r] #461552
08/11/16 00:40
08/11/16 00:40
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Online OP
Senior Expert
Quad  Online OP
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
tried that too still on_resize and on_1 etc still not firing.

Okay dammit, i forgot managed the message loop myself.

Last edited by Quad; 08/11/16 00:41.

3333333333
Re: Assigning on_* events(C++ Engine SDK) [Re: Quad] #461553
08/11/16 01:01
08/11/16 01:01
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
If those events dont work you can simply hook the directx function.
Its called Reset() and its vtable index is 16

Re: Assigning on_* events(C++ Engine SDK) [Re: Ch40zzC0d3r] #461562
08/11/16 08:58
08/11/16 08:58
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Online OP
Senior Expert
Quad  Online OP
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
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.


3333333333

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1