Hi everybody. I'm having some sort of dependencies problem.
I'm trying to figure out how I can define types in one agc file, and then reference those types from a different agc file, when neither of these are the main.agc file.
Here's a heavily simplified example, which shows what I'm trying to do:
main.agc
#constant Debugging = 1
#insert "types.agc"
#insert "gridstuff.agc"
do blah blah loop this part isn't relevant
types.agc
type DepthSet
TileGrid as integer
Pawn as integer
endtype
DepthOf as DepthSet
if Not(Debugging)
DepthOf.TileGrid = 10000
DepthOf.Pawn = 10000
else
DepthOf.TileGrid = 5000
DepthOf.Pawn = 5000
endif
gridstuff.agc
function PrepGridTiles(GivenGrid as Tile[])
blah blah
function GridCreator(blah blah)
blah blah
SetSpriteDepth(BlahBlahSpriteID, DepthOf.TileGrid)
blah blah
endfunction
I've tried both #include and #insert, and I've tried moving the definition of DepthOf to the other agc files (although even if it worked that's a problem conceptually).
Basically I can't seem to get main.agc to understand that the grid creation and manipulation functions (in gridstuff.agc) are using types that have been defined (in types.agc).
It's mean time. *averages*