Is there a way to embed, say, normal c++ ?
Monkey Forums/Monkey Programming/Is there a way to embed, say, normal c++ ?
| ||
Hi all, I'm interested in using Monkey on my next project. An issue I have is, I use BASS for music, and so in order to use Monkey I'd have to do a somewhat complex dance of post-editing in order to play BASS music in my game. Is there any chance of getting (or does there exist) a Monkey directive, say, similar to _asm in C++, that would allow us to just embed C++ code in the Monkey code? Or as3 or obj-c or anything else for that matter? Simply something to take what you've written, and dump it into the result file? Say I wanted to make a PlaySong method that does nothing on Flash, but plays BASS routines in my C++ for Win or Mac... I'd do something like: [cpp start] BASS_PlayChannel(blah,blah,blah); [cpp end] [as3 start] // Does nothing [as3 end] etc? |
| ||
You can import multiple languages into a Monkey application: http://www.monkeytools.net/articles/Exiting_a_Monkey_app |