How do I wrap C++ with Blitzmax? its my own code

BlitzMax Forums/BlitzMax Beginners Area/How do I wrap C++ with Blitzmax? its my own code

Robert Cummings(Posted 2010) [#1]
Hi,

I'm a beginner to using Blitzmax with C++. I have most of my iphone game written in C++, but I would like to call the generic C++ code from blitzmax instead of porting it. If I understand right it should be doable without any problems since it is pure logic with the odd malloc or two.

I would also love the C++ code to somehow call a Blitzmax function if that is possible.

If I can do this, I can deploy to 3 platforms at the same time :)


Would like some pointers where to begin doing this, or even if its possible. The C++ code is just game logic, ai, decision making stuff, and does not depend on any platform specific calls.


skidracer(Posted 2010) [#2]
If you want to keep it simple don't call BlitzMax from your c++, you will end up with a cleaner more orthogonal encapsulation

to put you off perhaps this will help


jkrankie(Posted 2010) [#3]
Didn't Brucey wrap ImageMagic? It's always worth checking out Brucey's Mods.

Cheers
Charlie


Brucey(Posted 2010) [#4]
Oooh, what's orthogonal mean?


skidracer(Posted 2010) [#5]
I was thinking it meant the dependency graph flowed in a single direction, but after googling it, it seems I was just making it up in an attempt to sound educated, which I'm not.