Tic-80: use dofile to import libraries

Created on 27 Mar 2018  路  3Comments  路  Source: nesbox/TIC-80

I think it would be nice if dofile() could be used to import libraries and then use the in the code in your cart.
thiswouldbeawesome
Here I would load my Library with some nice advanced printing functions and then I would use them in the code given in the cart.

I think it could be done by making dofile() insert the code out of the file virtually at the position where the dofile() stood.

Most helpful comment

insert the code out of the file virtually at the position where the dofile() stood.

It wouldn't defeat the limit if the file is inserted into the same buffer as the cartidge...
The buffer could still be limited.

All 3 comments

Wouldn't this defeat the purpose of having a code limit?

insert the code out of the file virtually at the position where the dofile() stood.

It wouldn't defeat the limit if the file is inserted into the same buffer as the cartidge...
The buffer could still be limited.

715 duplicate

Was this page helpful?
0 / 5 - 0 ratings