311 views
in Getting started by
A question about the example Applet.
I have run it, so I know it works, but I do not understand how it works in the prototyper.

In the method Game.OnCreate there are these lines

$if $prototyper
  return GameInit( aSize );
$else

So this is in the prototyper section, it is not native C code.
So it is Chora code.

but I cant find any function GameInit in the GUI project, only in the C code gameapi.c

So does this mean the prototyper is calling up C code ?

How can this work, there is only source code in my example folder, it is not compiled, there is no executable.
Same thing with GameMove, GameAnimate etc.

I looked for some variant methods for the prototyper but could not find any.

Am I missing something here ?

1 Answer

0 votes
by
 
Best answer

Hello Robert,

the function GameInit() together with all other "native" GameXXX functions is implemented in an Intrinsics Module. You see this module as file Game.ewi within the Applet example folder. In practice the Intrinsics module enhances the Chora by additional functions permitting you to use these during the prototyping. As such these functions can be invoked directly in Chora syntax. From technical point of view the Intrinsics module is a Windows DLL (dynamically loadable library) eEmbedded Wizard loads when the prototyping environment is initialized. The corresponding Visual Studio project Applet.sln is also found in the Applet example folder. 

The technique behind the Intrinsics modules is explained in the section Implementing Prototyper intrinsics

Does it help you?

Best regards

Paul Banach

 

by
Paul

Yes, that is exactly what I needed to know.

Thanks

Robert

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...