Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: ClainBill on February 04, 2019, 12:52:40 pm
-
Because I'm organised 8) , I would like to NOT include my tile map code in the same program the rest of my code is in, Instead I can just put the map in another program (let's call it MAPCODE for fun) and in my main program refer the contents of this code and store it into GDB1
Let's say that:
[01010101010101010101010101010101010101010101010101010101]->GDB1
[01000000000000000000000000000000000000000000000000000001]
[01000002030400000000000000000000000000000000000000000001]
[01000005060700000000000000000000000000000000000000000001]
[01000008090A00000000000000000000000000000000000000000001]
[010000000B0000000000000000000000000000000000000000000001]
[010000000B0000000000000000000000000000000000000000000001]
[01000000000000000000000000000000000000000000000000000001]
[01000000000000000000000000000000000000000000000000000001]
[01010101010101010101010101010101010101010101010101010101]
Is the contents in MAPCODE.
How?
How do I put this info into another program? so that now i don't have to scroll past this huge mass of code every time I'm going to change one small detail?
edit: This is in Axe in case anyone wasn't sure
-
There is this.
prgmNAME | The code from the external program is parsed as if it completely replaced this command in the main program. (Similar to the C++ "include")
Personally I like putting data like sprites and tilemaps to appvar.
-
So I could just put
prgmMAPCODE
and because in that program I already said in the first row [...]->GDB1 that's now all I need?
I tried it and it throws an error : BAD HEADER ?
-
figured it out, for future reference
Main Program (called MAINSRC)
.MAIN
prgmMAPCODE
Sub program (called MAPCODE)
..MAPDATA
[01010101010101010101010101010101010101010101010101010101]->GDB1
[01000000000000000000000000000000000000000000000000000001]
[01000002030400000000000000000000000000000000000000000001]
[01000005060700000000000000000000000000000000000000000001]
[01000008090A00000000000000000000000000000000000000000001]
[010000000B0000000000000000000000000000000000000000000001]
[010000000B0000000000000000000000000000000000000000000001]
[01000000000000000000000000000000000000000000000000000001]
[01000000000000000000000000000000000000000000000000000001]
[01010101010101010101010101010101010101010101010101010101]
The sub program has to have a double dot .. and then a name so that axe knows its a sub program, then use prgmMAPDCODE (in this case) as usual
-
Thanks for posting the answer for future reference!
-
you know me ^-^