781 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...