Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fourspriter: Sprite Engine from the Mojon Twins
#10
apenao Wrote:
britlion Wrote:Aha. I hadn't noticed the end asm label: asm hops.

Incidentally, when including asm code, you have to make sure it doesn't run automatically - one easy way to do that is to include it in a sub or a function:

Yep, that's true. I found that the hard way. What I do to solve this is to #include the code at the end of the basic program, after an END statement.

But I agree your method would be more readable (and therefor more accesible). At first I tried to do it that way, but I think I encountered some problems as different routines share some code, so when I cut the code into subroutines I ruined some jumps.

It's a good idea. Alto have a look at the library/ directory. There's a library template to make .bas include files. Basically:
  • Use #ifdef... #endif to avoid recursive includes
  • Look at the pragmas (option push and option case insensitive). If you enable case insentive in your module, your functions might be callable with any letter case configuration:
    spriteattr(...) or SpriteATTR(...) or SpriteAttr(...) for example, will all be valid.

I can help both Britlion and you when 1.2.5 release is out, if you like.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)