Splitting Assets from Code: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 126: Line 126:
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
beginseg
beginseg
name "texbuf"
name "buffer"
flags OBJECT
flags OBJECT
after "code" // You can use 'address' if you want to specify an exact RAM address to put the buffer at
after "code" // You can use 'address' if you want to specify an exact RAM address to put the buffer at
include "texbuf.o"
include "buffer.o"
endseg
endseg
</syntaxhighlight>
</syntaxhighlight>
Line 137: Line 137:
TODO
TODO
</tabber>
</tabber>

Once it's linked, you're all set! You just need to ensure your array is <code>extern</code>'d somewhere and you can use it without any other changes to your code.


A useful trick, you can <code>extern</code> the codesegment as well:
A useful trick, you can <code>extern</code> the codesegment as well: