What can I do when I use a library (like FamiTone) and I want to call the functions from within C in CC65?
The function names don't start with an underscore, so unless I modify the source code myself, I don't see a way to use the FamiTone functions in C.
I created a wrapper file that does the following since the FamiTone library doesn't include the export commands:
Now, is there a way to export the functions with an alias?
After all, this version here is not the best solution:
And I don't really want to use inline assembly in my code for a mere function call if I can avoid it.
The function names don't start with an underscore, so unless I modify the source code myself, I don't see a way to use the FamiTone functions in C.
I created a wrapper file that does the following since the FamiTone library doesn't include the export commands:
Code:
.segment "CODE"
.include "famitone2.s"
.export FamiToneInit
.export FamiToneUpdate
.export FamiToneMusicPlay
.export FamiToneMusicStop
.include "famitone2.s"
.export FamiToneInit
.export FamiToneUpdate
.export FamiToneMusicPlay
.export FamiToneMusicStop
Now, is there a way to export the functions with an alias?
After all, this version here is not the best solution:
Code:
_FamiToneMusicPlay:
JSR FamiToneMusicPlay
RTS
_FamiToneMusicStop:
JSR FamiToneMusicStop
RTS
JSR FamiToneMusicPlay
RTS
_FamiToneMusicStop:
JSR FamiToneMusicStop
RTS
And I don't really want to use inline assembly in my code for a mere function call if I can avoid it.